diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-08-26 23:11:24 -0400 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-08-26 23:11:24 -0400 |
commit | 3302066f69b1d81940a9ae389e042870bcfae5b2 (patch) | |
tree | 4bc19ae8bad9e0b8e33dbccdd068a58a244ce3b5 /modules | |
parent | 5fe2ec264febd6a4112c5f8c72c170f016bdf0c8 (diff) | |
download | gitea-3302066f69b1d81940a9ae389e042870bcfae5b2.tar.gz gitea-3302066f69b1d81940a9ae389e042870bcfae5b2.zip |
Fixes #7945 - makes sure we are only getting tag refs (#7990)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/git/repo_tag.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_tag.go b/modules/git/repo_tag.go index 20c36bd708..91a7a0cd50 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 } |