summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 86961d68d7..7a6eaea215 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -135,13 +135,14 @@ func NewRepoContext() {
}
// Check Git version.
- gitVer, err := git.BinVersion()
+ var err error
+ setting.Git.Version, err = git.BinVersion()
if err != nil {
log.Fatal(4, "Failed to get Git version: %v", err)
}
- log.Info("Git Version: %s", gitVer)
- if version.Compare("1.7.1", gitVer, ">") {
+ log.Info("Git Version: %s", setting.Git.Version)
+ if version.Compare("1.7.1", setting.Git.Version, ">") {
log.Fatal(4, "Gitea requires Git version greater or equal to 1.7.1")
}