git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [bug] Graph log and orphan branches

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Dec 30, 2015, 20:43 UTC
Message-ID
<1451508209.9251.13.camel@kaarsemaker.net>
In-Reply-To
<xmqqziwremqh.fsf@gitster.mtv.corp.google.com>
On wo, 2015-12-30 at 11:54 -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Carlos Pita <carlosjosepita@gmail.com> 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
Previous: Junio C HamanoNext: Carlos Pita
Message 4 of 6 in “[bug] Graph log and orphan branches”
  1. Carlos PitaDec 30, 2015
  2. Carlos PitaDec 30, 2015
  3. Junio C HamanoDec 30, 2015
  4. Dennis KaarsemakerDec 30, 2015
  5. Carlos PitaDec 30, 2015
  6. Junio C HamanoDec 30, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.