1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-03 00:57:52 +02:00

Show tag information for selected tag

This commit is contained in:
Stefan Haller
2025-06-24 17:22:58 +02:00
parent b12b1040c3
commit e5b09f34e0
2 changed files with 53 additions and 1 deletions

View File

@ -57,3 +57,20 @@ func (self *TagCommands) Push(task gocui.Task, remoteName string, tagName string
return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()
}
// Return info about an annotated tag in the format:
//
// Tagger: tagger name <tagger email>
// TaggerDate: tagger date
//
// Tag message
//
// Should only be called for annotated tags.
func (self *TagCommands) ShowAnnotationInfo(tagName string) (string, error) {
cmdArgs := NewGitCmd("for-each-ref").
Arg("--format=Tagger: %(taggername) %(taggeremail)%0aTaggerDate: %(taggerdate)%0a%0a%(contents)").
Arg("refs/tags/" + tagName).
ToArgv()
return self.cmd.New(cmdArgs).RunWithOutput()
}