diff options
author | Junio C Hamano <junkio@cox.net> | 2006-03-03 14:34:40 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-03 14:34:40 -0800 |
commit | f794c23466c2230b15ebf7ec30e06a390d1832a4 (patch) | |
tree | 2045a67c07b24efbe480dab7c5d951f0a3b1e293 /show-branch.c | |
parent | d51fac53108b1822ba6b3ff8dd2cd242b40eaac5 (diff) | |
download | git-f794c23466c2230b15ebf7ec30e06a390d1832a4.tar.gz git-f794c23466c2230b15ebf7ec30e06a390d1832a4.tar.xz |
show-branch --topics: omit more uninteresting commits.
When inspecting contents of topic branches for yet-to-be-merged
commits, a commit that is in the release/master branch is
uninteresting. Previous round still showed them, especially,
the ones before a topic branch that was forked from the
release/master later than other topic branches.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'show-branch.c')
-rw-r--r-- | show-branch.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/show-branch.c b/show-branch.c index 452e63f78..24efb65e6 100644 --- a/show-branch.c +++ b/show-branch.c @@ -727,24 +727,16 @@ int main(int ac, char **av) while (seen) { struct commit *commit = pop_one_commit(&seen); int this_flag = commit->object.flags; + int is_merge_point = ((this_flag & all_revs) == all_revs); - shown_merge_point |= ((this_flag & all_revs) == all_revs); + shown_merge_point |= is_merge_point; if (1 < num_rev) { int is_merge = !!(commit->parents && commit->parents->next); - if (topics) { - int interesting = 0; - for (i = 1; i < num_rev; i++) { - if ((this_flag & - (1u << (i + REV_SHIFT)))) { - interesting = 1; - break; - } - } - if (!interesting) - continue; - } - + if (topics && + !is_merge_point && + (this_flag & (1u << REV_SHIFT))) + continue; for (i = 0; i < num_rev; i++) { int mark; |