summaryrefslogtreecommitdiffstats
path: root/modules/setting/git.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-05-15 09:57:00 +0800
committerGitHub <noreply@github.com>2019-05-15 09:57:00 +0800
commit710245e81e0d65c72231dbb3b5c9f860cdc71899 (patch)
tree6987b804cb38ab175e6749e7c4b9e77b0362e499 /modules/setting/git.go
parent95d3d42c5fd51bcc64774841edad158f6e5ef60f (diff)
downloadgitea-710245e81e0d65c72231dbb3b5c9f860cdc71899.tar.gz
gitea-710245e81e0d65c72231dbb3b5c9f860cdc71899.zip
Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)
* refactor models.NewRepoContext to extract git related codes to modules/git * fix imports * refactor
Diffstat (limited to 'modules/setting/git.go')
-rw-r--r--modules/setting/git.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/setting/git.go b/modules/setting/git.go
index 0ad16fc81e..8625c0e780 100644
--- a/modules/setting/git.go
+++ b/modules/setting/git.go
@@ -16,7 +16,6 @@ import (
var (
// Git settings
Git = struct {
- Version string `ini:"-"`
DisableDiffHighlight bool
MaxGitDiffLines int
MaxGitDiffLineCharacters int
@@ -65,6 +64,8 @@ func newGit() {
log.Fatal("Error retrieving git version: %v", err)
}
+ log.Info("Git Version: %s", binVersion)
+
if version.Compare(binVersion, "2.9", ">=") {
// Explicitly disable credential helper, otherwise Git credentials might leak
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "credential.helper=")