Skip to content

Commit 03300c0

Browse files
simpkinsgitster
authored andcommitted
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>
1 parent 1b9a946 commit 03300c0

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

graph.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -679,20 +679,6 @@ static void graph_output_commit_char(struct git_graph *graph, struct strbuf *sb)
679679
return;
680680
}
681681

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-
696682
/*
697683
* Print '*' in all other cases
698684
*/

0 commit comments

Comments
 (0)