git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Alphabetize git config --list

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
May 29, 2012, 05:21 UTC
Message-ID
<4FC45CEB.4070808@alum.mit.edu>
In-Reply-To
<20120528212309.GA4220@sigill.intra.peff.net>
On 05/28/2012 11:23 PM, Jeff King wrote:
Show 10 quoted lines
> 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,
> [...]

Is the order of *keys* important, or only the order of *values* for a given key? I believe that one could sort the output by key as long as the values for each key are kept in their original order (i.e., sort stably by key). This would indeed make it easier to read the output.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “Alphabetize git config --list”
  1. ZachMay 28, 2012
  2. Jeff KingMay 28, 2012
  3. Michael HaggertyMay 29, 2012
  4. Jeff KingMay 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.