diff options
Diffstat (limited to 'repo-settings.c')
-rw-r--r-- | repo-settings.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/repo-settings.c b/repo-settings.c index a36b9411e1..3021921c53 100644 --- a/repo-settings.c +++ b/repo-settings.c @@ -22,7 +22,7 @@ void prepare_repo_settings(struct repository *r) { int experimental; int value; - char *strval; + const char *strval; int manyfiles; if (!r->gitdir) @@ -78,7 +78,7 @@ void prepare_repo_settings(struct repository *r) if (!repo_config_get_int(r, "index.version", &value)) r->settings.index_version = value; - if (!repo_config_get_string(r, "core.untrackedcache", &strval)) { + if (!repo_config_get_string_tmp(r, "core.untrackedcache", &strval)) { int v = git_parse_maybe_bool(strval); /* @@ -89,10 +89,9 @@ void prepare_repo_settings(struct repository *r) if (v >= 0) r->settings.core_untracked_cache = v ? UNTRACKED_CACHE_WRITE : UNTRACKED_CACHE_REMOVE; - free(strval); } - if (!repo_config_get_string(r, "fetch.negotiationalgorithm", &strval)) { + if (!repo_config_get_string_tmp(r, "fetch.negotiationalgorithm", &strval)) { int fetch_default = r->settings.fetch_negotiation_algorithm; if (!strcasecmp(strval, "skipping")) r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING; |