Re: Alphabetize git config --list

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]