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

Re: [PATCH] graph.c: visual difference on subsequent series

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2013, 17:39 UTC
Message-ID
<xmqqsivlfg6z.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPNngRMprE3QwDn3y74QqitAs+-DCBm1oO33uKRHsn9jLrNSnA@mail.gmail.com>
Milton Soares Filho <milton.soares.filho@gmail.com> writes:
Show 30 quoted lines
> On 28 October 2013 13:41, Junio C Hamano <gitster@pobox.com> wrote:
>> I agree to all of the above, including the ugliness of 'x' ;-)
>>
>> A "blank" may however be hard to spot, if the range is limited,
>> though.  For example,
>
> A 'x' looks like termination points in some specification languages
> such as SDL and MSC and thus translates directly to the idea of a
> root-commit, at least IMO. For sure it does not stand out as blatantly
> as it should, but it gives a general idea without further
> distractions, which seems to be the idea of a simple 'git log --graph
> --oneline'.
>
> An idea that have just come to mind is to have a decorator to enforce
> this property, like this.
>
>       * HEAD
>      /* a1
>     | * a2
>     | * a3
>     | x a4 (root-commit)
>     * b1
>     * b2
>     x b3  (root-commit)
>
> This way the user only gets 'distracted' if he explicitly asks for it
> (--decorate), with all its colors and whatnot. What do you think?
> Should I aim for it?
>
> Besides anything else, this discussion is becoming very subjective.

If I have to choose, I'd rather avoid using 'x' or anything that have to override '*', not just 'x' being ugly, but the approach to _replace_ the "revision-mark" (usually '*' but sometimes '<', '^', etc) forces us to give priority between "root-ness" and other kinds of information (e.g. "left-ness"). That was the primary reason I liked Keshav's suggestion to use one extra line _below_ the root, which will allow us to still keep the existing information unlike what we discussed in our back-and-forth during the initial review.

I also think a blank (or divider) below the root commits does make it visually obvious that nothing comes _before_ the root commit in the history, which probably even removes the need to paint the tracks of histories leading to different roots in different colours.

I hope the above shows that my reaction was much less subjective than my response sounded ;-)

Thanks.
Previous: Milton Soares FilhoNext: Junio C Hamano
Message 8 of 11 in “graph.c: visual difference on subsequent series”
  1. graph.c: visual difference on subsequent seriesMilton Soares Filho, Oct 25, 2013
  2. Junio C HamanoOct 25, 2013
  3. Milton Soares FilhoOct 25, 2013
  4. Keshav KiniOct 26, 2013
  5. Junio C HamanoOct 28, 2013
  6. Keshav KiniOct 28, 2013
  7. Milton Soares FilhoOct 28, 2013
  8. Junio C HamanoOct 28, 2013
  9. graph: give an extra gap after showing root commitJunio C Hamano, Dec 20, 2013
  10. Junio C HamanoDec 20, 2013
  11. Thomas RastJan 3, 2014

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.