Merge branch 'en/ort-finalize-after-0-merges-fix'

A small API fix to the ort merge strategy backend.

* en/ort-finalize-after-0-merges-fix:
  merge-ort: fix calling merge_finalize() with no intermediate merge
This commit is contained in:
Junio C Hamano 2023-05-02 10:13:34 -07:00
commit 3927312601

View File

@ -4722,14 +4722,14 @@ void merge_switch_to_result(struct merge_options *opt,
void merge_finalize(struct merge_options *opt, void merge_finalize(struct merge_options *opt,
struct merge_result *result) struct merge_result *result)
{ {
struct merge_options_internal *opti = result->priv;
if (opt->renormalize) if (opt->renormalize)
git_attr_set_direction(GIT_ATTR_CHECKIN); git_attr_set_direction(GIT_ATTR_CHECKIN);
assert(opt->priv == NULL); assert(opt->priv == NULL);
clear_or_reinit_internal_opts(opti, 0); if (result->priv) {
FREE_AND_NULL(opti); clear_or_reinit_internal_opts(result->priv, 0);
FREE_AND_NULL(result->priv);
}
} }
/*** Function Grouping: helper functions for merge_incore_*() ***/ /*** Function Grouping: helper functions for merge_incore_*() ***/