Skip to content

Commit

Permalink
git-show-branch: tighten merge-base computation.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 11, 2005
1 parent 592ee97 commit 9ce7028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions show-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ static void join_revs(struct commit_list **list_p,

while (*list_p) {
struct commit_list *parents;
int still_interesting = !!interesting(*list_p);
struct commit *commit = pop_one_commit(list_p);
int flags = commit->object.flags & all_mask;
int still_interesting = !!interesting(*list_p);

if (!still_interesting && extra < 0)
if (!still_interesting && extra <= 0)
break;

mark_seen(commit, seen_p);
Expand Down

0 comments on commit 9ce7028

Please sign in to comment.