Re: [PATCH 1/2] revision: Denote root commits with '#'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 17, 2021, 22:44 UTC
- Message-ID
- <xmqq35yzmbf3.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20210117110337.429994-2-kmarek@pdinc.us>
Kyle Marek <kmarek@pdinc.us> 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.
Show 23 quoted lines
> Signed-off-by: Kyle Marek <kmarek@pdinc.us>
> ---
> 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 "";
> }