aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/git/commit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/commit.go b/modules/git/commit.go
index d6448bf26e..c06eabfbd4 100644
--- a/modules/git/commit.go
+++ b/modules/git/commit.go
@@ -484,7 +484,7 @@ func (c *Commit) GetBranchName() (string, error) {
// GetTagName gets the current tag name for given commit
func (c *Commit) GetTagName() (string, error) {
- data, err := NewCommand("describe", "--exact-match", "--tags", c.ID.String()).RunInDir(c.repo.Path)
+ data, err := NewCommand("describe", "--exact-match", "--tags", "--always", c.ID.String()).RunInDir(c.repo.Path)
if err != nil {
// handle special case where there is no tag for this commit
if strings.Contains(err.Error(), "no tag exactly matches") {