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>
Junio C Hamano committed
Mar 3, 2006 at 14:34 UTC
f794c23466c2230b15ebf7ec30e06a390d1832a4
1 file changed
+6
-14
show-branch.c
+6
-14
@@ -727,24 +727,16 @@ int main(int ac, char **av)
727
while (seen) {
728
struct commit *commit = pop_one_commit(&seen);
729
int this_flag = commit->object.flags;
730
+ int is_merge_point = ((this_flag & all_revs) == all_revs);
731
731
- shown_merge_point |= ((this_flag & all_revs) == all_revs);
732
+ shown_merge_point |= is_merge_point;
733
734
if (1 < num_rev) {
735
int is_merge = !!(commit->parents && commit->parents->next);
735
- if (topics) {
736
- int interesting = 0;
737
- for (i = 1; i < num_rev; i++) {
738
- if ((this_flag &
739
- (1u << (i + REV_SHIFT)))) {
740
- interesting = 1;
741
- break;
742
- }
743
- }
744
- if (!interesting)
745
- continue;
746
- }
747
-
736
+ if (topics &&
737
+ !is_merge_point &&
738
+ (this_flag & (1u << REV_SHIFT)))
739
+ continue;
740
741
for (i = 0; i < num_rev; i++) {
742
int mark;