mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-23 16:22:24 +03:00
Suppress output from background fetch
However, show it when there was an error. This is important for the case that a fork that you have as a remote was deleted, in which case the command log is the only way to get notified about that.
This commit is contained in:
@@ -22,6 +22,9 @@ type CmdObj struct {
|
||||
// see StreamOutput()
|
||||
streamOutput bool
|
||||
|
||||
// see SuppressOutputUnlessError()
|
||||
suppressOutputUnlessError bool
|
||||
|
||||
// see UsePty()
|
||||
usePty bool
|
||||
|
||||
@@ -123,6 +126,18 @@ func (self *CmdObj) StreamOutput() *CmdObj {
|
||||
return self
|
||||
}
|
||||
|
||||
// when you call this, the streamed output will be suppressed unless there is an error
|
||||
func (self *CmdObj) SuppressOutputUnlessError() *CmdObj {
|
||||
self.suppressOutputUnlessError = true
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
// returns true if SuppressOutputUnlessError() was called
|
||||
func (self *CmdObj) ShouldSuppressOutputUnlessError() bool {
|
||||
return self.suppressOutputUnlessError
|
||||
}
|
||||
|
||||
// returns true if StreamOutput() was called
|
||||
func (self *CmdObj) ShouldStreamOutput() bool {
|
||||
return self.streamOutput
|
||||
|
||||
Reference in New Issue
Block a user