return 0;
}
- if (!strcmp(k, "merge.diffstat") || !strcmp(k, "merge.stat"))
+ if (!strcmp(k, "merge.diffstat") || !strcmp(k, "merge.stat")) {
show_diffstat = git_config_bool(k, v);
- else if (!strcmp(k, "merge.verifysignatures"))
+ } else if (!strcmp(k, "merge.verifysignatures")) {
verify_signatures = git_config_bool(k, v);
- else if (!strcmp(k, "pull.twohead"))
+ } else if (!strcmp(k, "pull.twohead")) {
+ FREE_AND_NULL(pull_twohead);
return git_config_string(&pull_twohead, k, v);
- else if (!strcmp(k, "pull.octopus"))
+ } else if (!strcmp(k, "pull.octopus")) {
+ FREE_AND_NULL(pull_octopus);
return git_config_string(&pull_octopus, k, v);
- else if (!strcmp(k, "commit.cleanup"))
+ } else if (!strcmp(k, "commit.cleanup")) {
return git_config_string(&cleanup_arg, k, v);
- else if (!strcmp(k, "merge.ff")) {
+ } else if (!strcmp(k, "merge.ff")) {
int boolval = git_parse_maybe_bool(v);
if (0 <= boolval) {
fast_forward = boolval ? FF_ALLOW : FF_NO;
if (!pull_twohead) {
char *default_strategy = getenv("GIT_TEST_MERGE_ALGORITHM");
if (default_strategy && !strcmp(default_strategy, "ort"))
- pull_twohead = "ort";
+ pull_twohead = xstrdup("ort");
}
init_diff_ui_defaults();
}
strbuf_release(&buf);
free(branch_to_free);
+ free(pull_twohead);
+ free(pull_octopus);
discard_index(the_repository->index);
return ret;
}