summaryrefslogtreecommitdiffstats
path: root/modules/repository
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/repository
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/repository')
-rw-r--r--modules/repository/init.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/repository/init.go b/modules/repository/init.go
index 707f8f5250..569069ee1f 100644
--- a/modules/repository/init.go
+++ b/modules/repository/init.go
@@ -131,7 +131,7 @@ func initRepoCommit(tmpPath string, repo *models.Repository, u *models.User, def
"-m", "Initial commit",
}
- if git.CheckGitVersionConstraint(">= 1.7.9") == nil {
+ if git.CheckGitVersionAtLeast("1.7.9") == nil {
sign, keyID, signer, _ := models.SignInitialCommit(tmpPath, u)
if sign {
args = append(args, "-S"+keyID)
@@ -141,7 +141,7 @@ func initRepoCommit(tmpPath string, repo *models.Repository, u *models.User, def
committerName = signer.Name
committerEmail = signer.Email
}
- } else if git.CheckGitVersionConstraint(">= 2.0.0") == nil {
+ } else if git.CheckGitVersionAtLeast("2.0.0") == nil {
args = append(args, "--no-gpg-sign")
}
}