Skip to content

Commit bb423f9

Browse files
richmahnsapk
authored andcommitted
Backport for #7945 (#7994)
1 parent 4d6c8d9 commit bb423f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/git/repo_tag.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (repo *Repository) GetTagNameBySHA(sha string) (string, error) {
153153

154154
// GetTagID returns the object ID for a tag (annotated tags have both an object SHA AND a commit SHA)
155155
func (repo *Repository) GetTagID(name string) (string, error) {
156-
stdout, err := NewCommand("show-ref", "--", name).RunInDir(repo.Path)
156+
stdout, err := NewCommand("show-ref", "--tags", "--", name).RunInDir(repo.Path)
157157
if err != nil {
158158
return "", err
159159
}

0 commit comments

Comments
 (0)