Thread (1 message) 1 message, 1 author, 2022-08-16

Re: [PATCH 3/5] rebase: factor out merge_base calculation

From: Junio C Hamano <hidden>
Date: 2022-08-16 15:07:06

Phillip Wood [off-list ref] writes:
quoted
quoted
  -	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help