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

Re: [PATCH] graph.c: log.showRootMark to indicate root commits

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2018, 17:57 UTC
Message-ID
<xmqqk1tpze1x.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<0102016283000c69-b09d1499-8a50-45a7-9f41-01be648398bc-000000@eu-west-1.amazonses.com>
Lyubomyr Shaydariv <lsh.dev@ukr.net> writes:
Show 8 quoted lines
> When log.showRootMark is set, root commits are marked with
> the at sign (@).
>
> When log.showRootMark is not set, root commits are marked with
> the asterisk sign (*). This is the default behavior.
>
> Signed-off-by: Lyubomyr Shaydariv <lsh.dev@ukr.net>
> ---
So the idea is when you have a history like this:
    R1--A---B
              \
    R2--C---D---M
to show "git log --oneline --graph D B" like
        * B
        * A
        @ R1
        * D
        * C
        @ R2

because you cannot tell that between R1 and D there is no parent-child relationship otherwise?

One downside of that approach is that it is not clear how this feature should interact with --left-right. I do not think there is a clean way to do that, unless you come up with a pair of symbols, not just a single '@'.

Another way to show that there is no parent-child relationship between R1 and D is to show it like this instead:

        * B
        * A
         \
          * R1
        * D
        * C
        * R2

and that would work well with --left-right automatically (as you would just do the same thing as you would to a normal asterisk).

Previous: Lyubomyr ShaydarivNext: Junio C Hamano
Message 2 of 3 in “graph.c: log.showRootMark to indicate root commits”
  1. graph.c: log.showRootMark to indicate root commitsLyubomyr Shaydariv, Apr 1, 2018
  2. Junio C HamanoApr 2, 2018
  3. Junio C HamanoApr 2, 2018

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.