Skip to content

Commit

Permalink
Fixes #7945 - makes sure we are only getting tag refs (#7990)
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn authored and techknowlogick committed Aug 27, 2019
1 parent 5fe2ec2 commit 3302066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/git/repo_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (repo *Repository) GetTagNameBySHA(sha string) (string, error) {

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

0 comments on commit 3302066

Please sign in to comment.