Skip to content

Commit

Permalink
git log --graph: print '*' for all commits, including merges
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Simpkins authored and Junio C Hamano committed Jun 6, 2008
1 parent 1b9a946 commit 03300c0
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,20 +679,6 @@ static void graph_output_commit_char(struct git_graph *graph, struct strbuf *sb)
return;
}

/*
* Print 'M' for merge commits
*
* Note that we don't check graph->num_parents to determine if the
* commit is a merge, since that only tracks the number of
* "interesting" parents. We want to print 'M' for merge commits
* even if they have less than 2 interesting parents.
*/
if (graph->commit->parents != NULL &&
graph->commit->parents->next != NULL) {
strbuf_addch(sb, 'M');
return;
}

/*
* Print '*' in all other cases
*/
Expand Down

0 comments on commit 03300c0

Please sign in to comment.