From ea9997a9ddaa5c1ae3a3f062dddfeb92321f2338 Mon Sep 17 00:00:00 2001
From: zeripath <art27@cantab.net>
Date: Fri, 17 Jun 2022 21:18:35 +0100
Subject: [PATCH] Add fetch.writeCommitGraph to gitconfig (#20006)

Add fetch.writeCommitGraph to gitconfig to ensure that a commit-graph will be written
on git fetch calls.

Signed-off-by: Andrew Thornton <art27@cantab.net>
---
 modules/git/git.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/git/git.go b/modules/git/git.go
index e59eeddc66..3a3663995b 100644
--- a/modules/git/git.go
+++ b/modules/git/git.go
@@ -238,6 +238,9 @@ func syncGitConfig() (err error) {
 		if err := configSet("gc.writeCommitGraph", "true"); err != nil {
 			return err
 		}
+		if err := configSet("fetch.writeCommitGraph", "true"); err != nil {
+			return err
+		}
 	}
 
 	if SupportProcReceive {