Merge branch 'ds/commit-graph-on-fetch'
[gitweb.git] / repo-settings.c
index 3779b85c17532c7f51de0ae6e28208e3ca2c9c8e..05546db98eebb469bfeca854de1c3f4e9cc25b5b 100644 (file)
@@ -49,10 +49,14 @@ void prepare_repo_settings(struct repository *r)
                UPDATE_DEFAULT_BOOL(r->settings.index_version, 4);
                UPDATE_DEFAULT_BOOL(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE);
        }
+       if (!repo_config_get_bool(r, "fetch.writecommitgraph", &value))
+               r->settings.fetch_write_commit_graph = value;
        if (!repo_config_get_bool(r, "feature.experimental", &value) && value) {
                UPDATE_DEFAULT_BOOL(r->settings.pack_use_sparse, 1);
                UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
+               UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 1);
        }
+       UPDATE_DEFAULT_BOOL(r->settings.fetch_write_commit_graph, 0);
 
        /* Hack for test programs like test-dump-untracked-cache */
        if (ignore_untracked_cache_config)