git-show-branch: tighten merge-base computation.
This makes the merge-base computation resistant to the pathological case discussed on the list earlier, by doing the same logic as git-merge-base. As a side effect, it breaks the command's primary function to list non-merge commit sequences, which needs to be fixed separately. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 9, 2005 at 23:36 UTC
9ce7028531fd7ce1ca8d75a5c4f9a941ef79c9d4
1 file changed
+2
-2
show-branch.c
+2
-2
@@ -181,11 +181,11 @@ static void join_revs(struct commit_list **list_p,
181
182
while (*list_p) {
183
struct commit_list *parents;
184
+ int still_interesting = !!interesting(*list_p);
185
struct commit *commit = pop_one_commit(list_p);
186
int flags = commit->object.flags & all_mask;
186
- int still_interesting = !!interesting(*list_p);
187
188
- if (!still_interesting && extra < 0)
188
+ if (!still_interesting && extra <= 0)
189
break;
190
191
mark_seen(commit, seen_p);