git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael Ascensão" <rafa.almas@gmail.com>
To: Alex Henrie <alexhenrie24@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit
Date: Mon, 25 Mar 2019 01:17:17 +0000	[thread overview]
Message-ID: <20190325011717.GA5357@rigel> (raw)
In-Reply-To: <CAMMLpeQbz5qHyK8e4gZ0zKQ5na+zQCd49GZifKZ_iO-gXrs1Gg@mail.gmail.com>

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

  reply	other threads:[~2019-03-25  1:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23  4:13 [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit Alex Henrie
2019-03-23  6:03 ` Abhisek Ghosh
2019-03-24 13:03 ` [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit Junio C Hamano
2019-03-24 18:58   ` Ævar Arnfjörð Bjarmason
2019-03-24 22:37   ` Alex Henrie
2019-03-25  1:17     ` Rafael Ascensão [this message]
2019-03-25  5:10       ` Alex Henrie
2019-03-25  5:16         ` Alex Henrie
     [not found]           ` <CACUQV59x-W+fCz_O5EnbZhjZ1CB2NhEQbkR8dAYMizAQGQ2SFA@mail.gmail.com>
2019-03-27 17:49             ` Alex Henrie
2019-04-01 10:45       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190325011717.GA5357@rigel \
    --to=rafa.almas@gmail.com \
    --cc=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).