aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/commit.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-21 16:42:08 +0100
committerGitHub <noreply@github.com>2020-10-21 11:42:08 -0400
commitde6e427a0188ef1be6108c5a71979dc4dd679aec (patch)
treeac0d5a17dcac25c4a6f702b6949123d527027002 /modules/git/commit.go
parent53359b1861c79ea688a3c230d235fb515eb44c01 (diff)
downloadgitea-de6e427a0188ef1be6108c5a71979dc4dd679aec.tar.gz
gitea-de6e427a0188ef1be6108c5a71979dc4dd679aec.zip
go-version constraints ignore pre-releases (#13234)
Go-version constraints ignore pre-releases. Rather than change the library further this PR simply changes the git version comparison to use simple version compare ignoring the issue of pre-releases. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/commit.go')
-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 6d2bc2b02c..87278af9c7 100644
--- a/modules/git/commit.go
+++ b/modules/git/commit.go
@@ -477,7 +477,7 @@ func (c *Commit) GetBranchName() (string, error) {
args := []string{
"name-rev",
}
- if CheckGitVersionConstraint(">= 2.13.0") == nil {
+ if CheckGitVersionAtLeast("2.13.0") == nil {
args = append(args, "--exclude", "refs/tags/*")
}
args = append(args, "--name-only", "--no-undefined", c.ID.String())