Subject: Re: [bug] Graph log and orphan branches

From: Dennis Kaarsemaker <[email-masked]>
Date: Wed, 30 Dec 2015 21:43:29 +0100

On wo, 2015-12-30 at 11:54 -0800, Junio C Hamano wrote:
> Carlos Pita <[email-masked]> writes:
> 
> > the graph output of log show orphan branches in a way that suggests
> > they have a parent.
> 
> Reminds me of this ancient RFH topic
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/236708/focus
> =239580
> 
> which unfortunately got no help...

Instead of a blank line, why not something like this to make root
commits stand out a bit?

diff --git a/revision.c b/revision.c
index 0a282f5..e69a992 100644
--- a/revision.c
+++ b/revision.c
@@ -3346,7 +3346,7 @@ char *get_revision_mark(const struct rev_info *revs, const struct commit *commit
                else
                        return ">";
        } else if (revs->graph)
-               return "*";
+               return commit->parents ? "*" : "^" ;
        else if (revs->cherry_mark)
                return "+";
        return "";

-- 
Dennis Kaarsemaker
www.kaarsemaker.net