Suppress command logs for tag commands

The command log is supposed to show only commands initiated by the user;
these are commands that we run to get information for rendering, so they
pollute the log and are confusing.
This commit is contained in:
Stefan Haller 2026-07-19 19:19:47 +02:00
parent 15c83e6356
commit 33a2dc302e

View file

@ -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
}