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

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

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 3, 2015, 08:04 UTC
Message-ID
<55E7FEF3.2020400@drmicha.warpmail.net>
In-Reply-To
<xmqqegjticd7.fsf@gitster.dls.corp.google.com>
Junio C Hamano venit, vidit, dixit 27.07.2015 22:17:
Show 17 quoted lines
> Antoine Beaupré <anarcat@koumbit.org> writes:
> 
>> Any reason why this patch wasn't included / reviewed?
>> ...
>>> This patch is similar than the one provided by Milton Soares Filho in
>>> 1382734287.31768.1.git.send.email.milton.soares.filho@gmail.com but was
>>> implemented independently and uses the 'o' character instead of 'x'.
> 
> The reason why Milton's patch was not taken after discussion [*1*]
> was not because its implementation was poor, but its design was not
> good.  By overriding '*' '<' or '>' with x, it made it impossible to
> distinguish a root on the left side branch and a root on the right
> side branch.
> 
> Is the design of your independent implementation the same except
> that 'o' is used instead of 'x'?  Independent implementation does
> not make the same design magically better, if that is the case ;-)
Interestingly, the patch to the tests lists * to o changes only, no < or
> to o.

The reason is simply that the patch doesn't change anything for left nor right commits. I would say that is the best compromise since it does not change the overall layout, provides more information by default and does not override information that is requested specifically.

If we want to put more information into log --graph simultaneously we should really go beyond ASCII and look at how tig does it, e.g. using unicode characters.

Show 31 quoted lines
> If the design is different, please explain how your patch solves the
> issue with Milton's design in your log message.
> 
> For example, you could use the column arrangement to solve it, e.g.
> 
> History sequence A: a1 -- a2 -- a3 (root-commit)
> History sequence B: b1 -- b2 -- b3 (root-commit)
> 
>     $ git log --graph --oneline A B
>     * a1
>     * a2
>     * a3
>       * b1
>       * b2
>       * b3
> 
>     $ git log --graph --oneline --left-right A...B
>     < a1
>     < a2
>     < a3
>       > b1
>       > b2
>       > b3
> 
> I am not saying that the above would be the only way to do so; there
> may be other ways to solve the issue.
> 
> [Reference]
> 
> *1* http://thread.gmane.org/gmane.comp.version-control.git/236708/focus=236843
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 7 in “graph.c: visual difference on subsequent series”
  1. graph.c: visual difference on subsequent seriesAntoine Beaupré, Nov 10, 2014
  2. Antoine BeaupréJul 27, 2015
  3. Junio C HamanoJul 27, 2015
  4. Michael J GruberSep 3, 2015
  5. Junio C HamanoSep 3, 2015
  6. Michael J GruberSep 4, 2015
  7. Junio C HamanoSep 4, 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.