]> git.ipfire.org Git - thirdparty/git.git/blobdiff - repo-settings.c
Merge branch 'rs/parallel-read-cache-fix'
[thirdparty/git.git] / repo-settings.c
index dc6817daa9537c3877dae686368ef58708ac0512..aa61a35338138edb31ff6791ad08d560b674c04b 100644 (file)
@@ -39,6 +39,8 @@ void prepare_repo_settings(struct repository *r)
        if (!repo_config_get_string(r, "fetch.negotiationalgorithm", &strval)) {
                if (!strcasecmp(strval, "skipping"))
                        r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING;
+               else if (!strcasecmp(strval, "noop"))
+                       r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_NOOP;
                else
                        r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_DEFAULT;
        }
@@ -51,14 +53,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.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);
 
+       if (!repo_config_get_bool(r, "feature.experimental", &value) && value)
+               UPDATE_DEFAULT_BOOL(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
+
        /* Hack for test programs like test-dump-untracked-cache */
        if (ignore_untracked_cache_config)
                r->settings.core_untracked_cache = UNTRACKED_CACHE_KEEP;