Re: [PATCH 1/2] revision: Denote root commits with '#'
From: Junio C Hamano <hidden>
Date: 2021-01-17 22:44:50
Kyle Marek [off-list ref] writes:
Subject: Re: [PATCH 1/2] revision: Denote root commits with '#'
Downcase "D"; this will stand out in "git shortlog --no-merges" for a wrong reason otherwise.
This aids in identifying where an unrelated branch history starts when using `git log --graph --oneline --all`
This is triggerd only with --show-linear-break option, when combined with [2/2]? I think that is a bug introduced in the next step.
quoted hunk
Signed-off-by: Kyle Marek <redacted> --- revision.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)diff --git a/revision.c b/revision.c index 9dff845bed..8556923de8 100644 --- a/revision.c +++ b/revision.c@@ -4191,9 +4191,11 @@ const char *get_revision_mark(const struct rev_info *revs, const struct commit * return "<"; else return ">"; - } else if (revs->graph) + } else if (revs->graph) { + if (!commit->parents) + return "#"; return "*"; - else if (revs->cherry_mark) + } else if (revs->cherry_mark) return "+"; return ""; }