Browse Source

Fixes #7945 - makes sure we are only getting tag refs (#7990)

tags/v1.21.12.1
Richard Mahn techknowlogick 6 years ago
parent
commit
3302066f69
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/git/repo_tag.go

+ 1
- 1
modules/git/repo_tag.go View File

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


Loading…
Cancel
Save