From: Jeff King <peff@peff.net>
To: Zach <zach@letmesearchthat.com>
Cc: git@vger.kernel.org
Subject: Re: Alphabetize git config --list
Date: Mon, 28 May 2012 17:23:09 -0400 [thread overview]
Message-ID: <20120528212309.GA4220@sigill.intra.peff.net> (raw)
In-Reply-To: <CAFus=5=cp62hpLM_Odog--Q0vER8kkT5Doqo28i-yZQyfvv4gQ@mail.gmail.com>
On Mon, May 28, 2012 at 01:58:28PM -0700, Zach wrote:
> I was wondering if it would be possible to alphabetically order git
> config --list by default.
>
> Essentially this
> $ git config --list | sort
No, it's not a good idea; the order of keys is important. For example,
this config:
[color]
ui = true
ui = false
is different than this:
[color]
ui = false
ui = true
While that seems like a contrived example, consider something like a
.git/config repo-specific config file overriding a user-wide
~/.gitconfig file. We do it by overwriting the old key.
There are also some "multi" values which accept multiple entries to
create a list, and the list order may be relevant (I'd have to check,
though; the only one that comes to mind is refspecs, and I don't know
that order matters there).
-Peff
next prev parent reply other threads:[~2012-05-28 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-28 20:58 Alphabetize git config --list Zach
2012-05-28 21:23 ` Jeff King [this message]
2012-05-29 5:21 ` Michael Haggerty
2012-05-29 8:49 ` Jeff King
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=20120528212309.GA4220@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=zach@letmesearchthat.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).