Re: [PATCH 3/5] rebase: factor out merge_base calculation
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 20 quoted lines
>>> - merge_bases = get_merge_bases(onto, head);
>>> - if (!merge_bases || merge_bases->next) {
>>> - oidcpy(merge_base, null_oid());
>>> + if (is_null_oid(merge_base))
>>> goto done;
>>> - }
>>> - oidcpy(merge_base, &merge_bases->item->object.oid);
>>> if (!oideq(merge_base, &onto->object.oid))
>>> goto done;
>> Looking at the change in "git show -W", it seems that this function
>> no longer touches merge_bases at all, other than initializing it to
>> NULL at the beginning and then calling free_commit_list() on it at
>> the end. Shouldn't it be removed?
>
> There is still the line
>
> merge_bases = get_merge_bases(upstream, head);
>
> lower down. I should remove the call to free_commit_list() just above
> that line though as it is no longer needed.Yup, that is correct.
Thanks.