git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Robert Karszniewicz <avoidr@posteo.de>, git@vger.kernel.org
Subject: Re: [RFC PATCH] log: add log.showStat configuration variable
Date: Thu, 8 Oct 2020 14:12:50 -0400	[thread overview]
Message-ID: <bec999ef-5f9c-0ca1-ddd9-70b54b8c51b1@gmail.com> (raw)
In-Reply-To: <20201008162015.23898-1-avoidr@posteo.de>

On 10/8/2020 12:20 PM, Robert Karszniewicz wrote:
> Changes default behaviour of `git log` and `git show` when no
> command-line options are given. Doesn't affect behaviour otherwise (same
> behaviour as with stash.showStat).
> ---
> I've wanted to have `show` and `log` show --stat by default, and I
> couldn't find any better solution for it. And I've discovered that there
> is stash.showStat, which is exactly what I want. So I wanted to bring
> stash.showStat to `show` and `log`.

I'm wondering: why should this be a config setting instead of just
a configure alias?

	git config --global alias.logs "log --stat"
 
My personal preference is to use "--graph --oneline" by default, so
I use

	git config --global alias.lg "log --graph --oneline"

and then type "git lg ..." whenever I'm looking at history. I also
have an easy way to turn off the graph by using just "git log" when
I want that disabled.

> So far, setting log.showStat affects behaviour as described in the
> commit message.
> But it does so for `show` and `log` at the same time. I think they
> should be configurable separately. (log.showStat and show.showStat)
> 
> Before I do all the work, please tell me if this is the right approach
> so far, and if the feature - when ready - would be accepted. (I'm aware
> that documentation and tests are missing.)

If this is something we want to do as a config instead of alias,
I'm wondering if it is worth expanding the scope and thinking about
these other arguments (like --graph, --oneline, etc.) and how they
could be incorporated into a coherent config system.

I worry that this initial step leads us down a road of slowly adding
one-off config settings for each option when:

 1. aliases exist, and
 2. it becomes unclear which arguments have configured defaults.

Thanks,
-Stolee


  parent reply	other threads:[~2020-10-08 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 16:20 [RFC PATCH] log: add log.showStat configuration variable Robert Karszniewicz
2020-10-08 17:58 ` Junio C Hamano
2020-10-10 14:02   ` Robert Karszniewicz
2020-10-08 18:12 ` Derrick Stolee [this message]
2020-10-11  9:59   ` Robert Karszniewicz
2020-10-12 12:50     ` Derrick Stolee
2020-10-12 16:14       ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=bec999ef-5f9c-0ca1-ddd9-70b54b8c51b1@gmail.com \
    --to=stolee@gmail.com \
    --cc=avoidr@posteo.de \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).