]> source.dussan.org Git - gitea.git/commitdiff
Backport for #7945 (#7994)
authorRichard Mahn <richmahn@users.noreply.github.com>
Tue, 27 Aug 2019 05:01:16 +0000 (01:01 -0400)
committerAntoine GIRARD <sapk@users.noreply.github.com>
Tue, 27 Aug 2019 05:01:16 +0000 (07:01 +0200)
modules/git/repo_tag.go

index 20c36bd70838142fb861dc67b3c52b3bdf0c5335..91a7a0cd5076254d28d0f499773f00972db89bd4 100644 (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
        }