Re: [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

On Sun, Mar 24, 2019 at 04:37:25PM -0600, Alex Henrie wrote:
> 
> Can we compromise and make --pretty=short the default for --graph?
> 

I agree that `pretty=medium` is sometimes hard to read and, as of now,
`pretty=oneline` can be very misleading:

    $ git log --graph --oneline todo~2..todo master~2..master

This will look like you have a sequence of commits when in fact they are
completely unrelated.

But If we make the default to 'short' (or anything else), what should be
done if the user has `format.pretty=` defined to something? Is `--graph`
special to be allowed to not follow said configuration?

It's inconsistent itself, and introduces inconsistencies on other things
like the configuration above.

In my opinion, a better alternative could be having a configuration like
log.graphFormat, similarly how we have log.graphColors for colors, to
determine which format should be used with --graph.

This would still require user configuration which may be what you were
trying to avoid by proposing the change in default behaviour.

Settling for a compromise feels like giving up on the strengths from both.

Cheers,
Rafael Ascensão



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux