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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:06

[administrivia: please avoid culling addresses from To:/Cc: lines]

Keshav Kini [off-list ref] writes:
What about just putting an extra blank line after every root commit line
(possibly except the last one)?  That should make it plenty easy to see
where the root commits are in --oneline mode.  I think it would actually
be easier to spot at a glance than replacing `*` with `x` because it
creates a gap in all columns of the output, rather than only in column
1.  Also, this is very subjective but I think it looks kind of ugly to
use "x" :P
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,

    $ git log --graph --oneline a4..
      * HEAD
     /* a1
    | * a2
    | * a3
    * b1
    * b2
    * b3

where "a4", which is a root, is the sole parent of "a3" and HEAD is
a merge between "a1" and "b1" might produce something like this,
while we may get this from the same history, when shown unlimited:

    $ git log --graph --oneline
      * HEAD
     /* a1
    | * a2
    | * a3
    | * a4
    |
    * b1
    * b2
    * b3

A divider line might make it visually a lot more strong, i.e.

    $ git log --graph --oneline
      * HEAD
     /* a1
    | * a2
    | * a3
    | * a4
    |   ~~~~~~~~~~~~~~~~~~~~~~~
    * b1
    * b2
    * b3

but I am not sure if it is too distracting.

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

From: Milton Soares Filho <hidden>
Date: 2016-06-15 22:59:06

On 28 October 2013 13:41, Junio C Hamano [off-list ref] 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.
I've received private feedbacks thanking for the changeset and not a
word against the poor 'x'. Maybe it's time to talk to a UI designer or
let a benevolent dictator set this quarrel off ;-)

[]s, milton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help