X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=show-branch.c;h=24efb65e622d8dfe44db22e5bc23c9f8cc328109;hb=08ddd4f7649ccf8b9f61c903de420bfd0a8a602e;hp=452e63f78682c44d52f1391a74077036b786f3b5;hpb=d4c9982f8eb2044781d443c4d2cd1c3db0f98e58;p=git.git diff --git a/show-branch.c b/show-branch.c index 452e63f7..24efb65e 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;