From bb423f9350c5e3b0447d916919459ac9d87ee44d Mon Sep 17 00:00:00 2001 From: Richard Mahn Date: Tue, 27 Aug 2019 01:01:16 -0400 Subject: [PATCH] Backport for #7945 (#7994) --- modules/git/repo_tag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git/repo_tag.go b/modules/git/repo_tag.go index 20c36bd70..91a7a0cd5 100644 --- a/modules/git/repo_tag.go +++ b/modules/git/repo_tag.go @@ -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 }