diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-02-13 19:49:42 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-13 19:49:42 +0800 |
commit | 5cc275b1defc56d54bec23d1a5740c3fadcff2b0 (patch) | |
tree | 77bbff1e221e5a3b60044ba4b33d55ba5a251d45 /models | |
parent | 091f0637060f62b5a94e9594b062f56919c2192c (diff) | |
download | gitea-5cc275b1defc56d54bec23d1a5740c3fadcff2b0.tar.gz gitea-5cc275b1defc56d54bec23d1a5740c3fadcff2b0.zip |
feat: add git version on admin panel. (#921)
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 7 |
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") } |