@matheusbsbs / matheus-bagliano / commits / 03300c0ac0
Fork 0

git log --graph: print '*' for all commits, including merges

Previously, merge commits were printed with 'M' instead of '*'. This had the potential to confuse users when not all parents of the merge commit were included in the log output. As Junio has pointed out, merge commits can almost always be easily identified from the log message, anyway. Signed-off-by: Adam Simpkins <adam@adamsimpkins.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Adam Simpkins committed Jun 5, 2008 at 02:28 UTC 03300c0ac0dfd6098ff65cff518bfffb05ae4194
1 file changed -14
graph.c
-14
@@ -679,20 +679,6 @@ static void graph_output_commit_char(struct git_graph *graph, struct strbuf *sb)
679 return;
680 }
681
682 - /*
683 - * Print 'M' for merge commits
684 - *
685 - * Note that we don't check graph->num_parents to determine if the
686 - * commit is a merge, since that only tracks the number of
687 - * "interesting" parents. We want to print 'M' for merge commits
688 - * even if they have less than 2 interesting parents.
689 - */
690 - if (graph->commit->parents != NULL &&
691 - graph->commit->parents->next != NULL) {
692 - strbuf_addch(sb, 'M');
693 - return;
694 - }
695 -
682 /*
683 * Print '*' in all other cases
684 */