summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRichard Mahn <richmahn@users.noreply.github.com>2019-08-26 23:11:24 -0400
committertechknowlogick <techknowlogick@gitea.io>2019-08-26 23:11:24 -0400
commit3302066f69b1d81940a9ae389e042870bcfae5b2 (patch)
tree4bc19ae8bad9e0b8e33dbccdd068a58a244ce3b5 /modules
parent5fe2ec264febd6a4112c5f8c72c170f016bdf0c8 (diff)
downloadgitea-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.go2
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
}