diff --git a/merge-ort.c b/merge-ort.c index 8b7de0fbd8..7d105be275 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -4536,6 +4536,8 @@ void merge_switch_to_result(struct merge_options *opt, if (checkout(opt, head, result->tree)) { /* failure to function */ result->clean = -1; + merge_finalize(opt, result); + trace2_region_leave("merge", "checkout", opt->repo); return; } trace2_region_leave("merge", "checkout", opt->repo); @@ -4546,6 +4548,9 @@ void merge_switch_to_result(struct merge_options *opt, /* failure to function */ opt->priv = NULL; result->clean = -1; + merge_finalize(opt, result); + trace2_region_leave("merge", "record_conflicted", + opt->repo); return; } opt->priv = NULL;