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
719
719
; ; To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file.
720
720
; ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
721
721
; ;
722
+ ; ; Whether to write a commit graph on fetch and gc, only relevant if git version >= 2.18
723
+ ; ;ENABLE_COMMIT_GRAPH_WRITE = true
722
724
; ; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
723
725
; PULL_REQUEST_PUSH_MESSAGE = true
724
726
; ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func syncGitConfig() (err error) {
50
50
}
51
51
}
52
52
53
- if DefaultFeatures ().CheckVersionAtLeast ("2.18" ) {
53
+ if ( DefaultFeatures ().CheckVersionAtLeast ("2.18" )) && ( setting . Git . EnableCommitGraphWrite ) {
54
54
if err := configSet ("core.commitGraph" , "true" ); err != nil {
55
55
return err
56
56
}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ var Git = struct {
26
26
VerbosePushDelay time.Duration
27
27
GCArgs []string `ini:"GC_ARGS" delim:" "`
28
28
EnableAutoGitWireProtocol bool
29
+ EnableCommitGraphWrite bool
29
30
PullRequestPushMessage bool
30
31
LargeObjectThreshold int64
31
32
DisableCoreProtectNTFS bool
@@ -49,6 +50,7 @@ var Git = struct {
49
50
VerbosePushDelay : 5 * time .Second ,
50
51
GCArgs : []string {},
51
52
EnableAutoGitWireProtocol : true ,
53
+ EnableCommitGraphWrite : true ,
52
54
PullRequestPushMessage : true ,
53
55
LargeObjectThreshold : 1024 * 1024 ,
54
56
DisablePartialClone : false ,
You can’t perform that action at this time.
0 commit comments