diff options
author | 6543 <6543@obermui.de> | 2022-01-25 19:15:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 19:15:58 +0100 |
commit | 80adbebbc8e0814d0fa0ac660d5c9452e458067b (patch) | |
tree | 50711b3b3760008b7b06abb22b452f2a12730dd2 /modules/git/git.go | |
parent | Place inline diff comment dialogs on split diff in 4th and 8th columns (#18403) (diff) | |
download | forgejo-80adbebbc8e0814d0fa0ac660d5c9452e458067b.tar.xz forgejo-80adbebbc8e0814d0fa0ac660d5c9452e458067b.zip |
Unexport git.GlobalCommandArgs (#18376)
Unexport the git.GlobalCommandArgs variable.
Diffstat (limited to 'modules/git/git.go')
-rw-r--r-- | modules/git/git.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/git/git.go b/modules/git/git.go index 294d33f916..217e6955c2 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -134,21 +134,21 @@ func Init(ctx context.Context) error { } // force cleanup args - GlobalCommandArgs = []string{} + globalCommandArgs = []string{} if CheckGitVersionAtLeast("2.9") == nil { // Explicitly disable credential helper, otherwise Git credentials might leak - GlobalCommandArgs = append(GlobalCommandArgs, "-c", "credential.helper=") + globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=") } // Since git wire protocol has been released from git v2.18 if setting.Git.EnableAutoGitWireProtocol && CheckGitVersionAtLeast("2.18") == nil { - GlobalCommandArgs = append(GlobalCommandArgs, "-c", "protocol.version=2") + globalCommandArgs = append(globalCommandArgs, "-c", "protocol.version=2") } // By default partial clones are disabled, enable them from git v2.22 if !setting.Git.DisablePartialClone && CheckGitVersionAtLeast("2.22") == nil { - GlobalCommandArgs = append(GlobalCommandArgs, "-c", "uploadpack.allowfilter=true") + globalCommandArgs = append(globalCommandArgs, "-c", "uploadpack.allowfilter=true") } // Save current git version on init to gitVersion otherwise it would require an RWMutex @@ -213,7 +213,7 @@ func Init(ctx context.Context) error { if err := checkAndSetConfig("core.protectntfs", "false", true); err != nil { return err } - GlobalCommandArgs = append(GlobalCommandArgs, "-c", "core.protectntfs=false") + globalCommandArgs = append(globalCommandArgs, "-c", "core.protectntfs=false") } return nil } |