mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Suppress output from a few git commands that pollute the command log (#5834)
This commit is contained in:
@@ -29,5 +29,5 @@ func (self *BlameCommands) BlameLineRange(filename string, commit string, firstL
|
||||
Arg("--").
|
||||
Arg(filename)
|
||||
|
||||
return self.cmd.New(cmdArgs.ToArgv()).RunWithOutput()
|
||||
return self.cmd.New(cmdArgs.ToArgv()).DontLog().RunWithOutput()
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func (self *TagCommands) HasTag(tagName string) bool {
|
||||
Arg("refs/tags/" + tagName).
|
||||
ToArgv()
|
||||
|
||||
return self.cmd.New(cmdArgs).Run() == nil
|
||||
return self.cmd.New(cmdArgs).DontLog().Run() == nil
|
||||
}
|
||||
|
||||
func (self *TagCommands) LocalDelete(tagName string) error {
|
||||
@@ -74,7 +74,7 @@ func (self *TagCommands) ShowAnnotationInfo(tagName string) (string, error) {
|
||||
Arg("refs/tags/" + tagName).
|
||||
ToArgv()
|
||||
|
||||
return self.cmd.New(cmdArgs).RunWithOutput()
|
||||
return self.cmd.New(cmdArgs).DontLog().RunWithOutput()
|
||||
}
|
||||
|
||||
func (self *TagCommands) IsTagAnnotated(tagName string) (bool, error) {
|
||||
@@ -83,6 +83,6 @@ func (self *TagCommands) IsTagAnnotated(tagName string) (bool, error) {
|
||||
Arg("refs/tags/" + tagName).
|
||||
ToArgv()
|
||||
|
||||
output, err := self.cmd.New(cmdArgs).RunWithOutput()
|
||||
output, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput()
|
||||
return strings.TrimSpace(output) == "tag", err
|
||||
}
|
||||
|
||||
@@ -199,12 +199,12 @@ func (self *FixupHelper) getDiff() (string, bool, error) {
|
||||
|
||||
// Try staged changes first
|
||||
hasStagedChanges := true
|
||||
diff, err := self.c.Git().Diff.DiffIndexCmdObj(append([]string{"--cached"}, args...)...).RunWithOutput()
|
||||
diff, err := self.c.Git().Diff.DiffIndexCmdObj(append([]string{"--cached"}, args...)...).DontLog().RunWithOutput()
|
||||
|
||||
if err == nil && diff == "" {
|
||||
hasStagedChanges = false
|
||||
// If there are no staged changes, try unstaged changes
|
||||
diff, err = self.c.Git().Diff.DiffIndexCmdObj(args...).RunWithOutput()
|
||||
diff, err = self.c.Git().Diff.DiffIndexCmdObj(args...).DontLog().RunWithOutput()
|
||||
}
|
||||
|
||||
return diff, hasStagedChanges, err
|
||||
|
||||
Reference in New Issue
Block a user