File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -719,6 +719,8 @@ LEVEL = Info
719719; ; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
720720; ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
721721; ;
722+ ; ; Whether to write a commit graph on fetch and gc, only relevant if git version >= 2.18
723+ ; ;ENABLE_COMMIT_GRAPH_WRITE = true
722724; ; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
723725; PULL_REQUEST_PUSH_MESSAGE = true
724726; ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func syncGitConfig() (err error) {
5050 }
5151 }
5252
53- if DefaultFeatures ().CheckVersionAtLeast ("2.18" ) {
53+ if ( DefaultFeatures ().CheckVersionAtLeast ("2.18" )) && ( setting . Git . EnableCommitGraphWrite ) {
5454 if err := configSet ("core.commitGraph" , "true" ); err != nil {
5555 return err
5656 }
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ var Git = struct {
2626 VerbosePushDelay time.Duration
2727 GCArgs []string `ini:"GC_ARGS" delim:" "`
2828 EnableAutoGitWireProtocol bool
29+ EnableCommitGraphWrite bool
2930 PullRequestPushMessage bool
3031 LargeObjectThreshold int64
3132 DisableCoreProtectNTFS bool
@@ -49,6 +50,7 @@ var Git = struct {
4950 VerbosePushDelay : 5 * time .Second ,
5051 GCArgs : []string {},
5152 EnableAutoGitWireProtocol : true ,
53+ EnableCommitGraphWrite : true ,
5254 PullRequestPushMessage : true ,
5355 LargeObjectThreshold : 1024 * 1024 ,
5456 DisablePartialClone : false ,
You can’t perform that action at this time.
0 commit comments