1
1
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-18 04:05:10 +01:00

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

This commit is contained in:
Richard Mahn 2019-08-26 23:11:24 -04:00 committed by techknowlogick
parent 5fe2ec264f
commit 3302066f69

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