summaryrefslogtreecommitdiffstats
path: root/modules/git/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/git.go')
-rw-r--r--modules/git/git.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/git/git.go b/modules/git/git.go
index 6f231cee7a..1061bdb0d5 100644
--- a/modules/git/git.go
+++ b/modules/git/git.go
@@ -120,6 +120,12 @@ func Init(ctx context.Context) error {
return err
}
+ if version.Compare(gitVersion, "2.10", ">=") {
+ if err := checkAndSetConfig("receive.advertisePushOptions", "true", true); err != nil {
+ return err
+ }
+ }
+
if version.Compare(gitVersion, "2.18", ">=") {
if err := checkAndSetConfig("core.commitGraph", "true", true); err != nil {
return err