1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 11:02:41 +03:00

Hack: log commands with pids to /tmp/git.log

This commit is contained in:
Stefan Haller
2025-05-02 18:20:10 +02:00
parent c2aab81f54
commit 815829d52c
8 changed files with 62 additions and 3 deletions

View File

@@ -19,6 +19,8 @@ type CmdObj struct {
// see DontLog()
dontLog bool
LogHackSuppressed bool
// see StreamOutput()
streamOutput bool
@@ -111,6 +113,11 @@ func (self *CmdObj) DontLog() *CmdObj {
return self
}
func (self *CmdObj) SuppressLogHack() *CmdObj {
self.LogHackSuppressed = true
return self
}
// This returns false if DontLog() was called
func (self *CmdObj) ShouldLog() bool {
return !self.dontLog