diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-09 23:36:15 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-11 10:52:38 -0800 |
commit | 9ce7028531fd7ce1ca8d75a5c4f9a941ef79c9d4 (patch) | |
tree | 92d355f00fca724483afc0053f156fd8f3e794d4 /show-branch.c | |
parent | 592ee97d8fffa2318960074057e044709163abf7 (diff) | |
download | git-9ce7028531fd7ce1ca8d75a5c4f9a941ef79c9d4.tar.gz git-9ce7028531fd7ce1ca8d75a5c4f9a941ef79c9d4.tar.xz |
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>
Diffstat (limited to 'show-branch.c')
-rw-r--r-- | show-branch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/show-branch.c b/show-branch.c index 70120005b..714e7f8ca 100644 --- a/show-branch.c +++ b/show-branch.c @@ -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); |