From: Jeff King Date: Mon, 28 May 2012 21:23:09 GMT Subject: Re: Alphabetize git config --list Message-ID: <20120528212309.GA4220@sigill.intra.peff.net> In-Reply-To: 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