Skip to content

Commit 3302066

Browse files
richmahntechknowlogick
authored andcommitted
Fixes #7945 - makes sure we are only getting tag refs (#7990)
1 parent 5fe2ec2 commit 3302066

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/git/repo_tag.go

Lines changed: 1 addition & 1 deletion
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)