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

Re: [PATCH] git-config(1): clarify precedence of multiple values

From
Jeff King <peff@peff.net>
Date
Jul 7, 2013, 19:55 UTC
Message-ID
<20130707195518.GB20700@sigill.intra.peff.net>
In-Reply-To
<20130707194956.GU9161@serenity.lan>
On Sun, Jul 07, 2013 at 08:49:56PM +0100, John Keeping wrote:
> In order to clarify which value is used when there are multiple values
> defined for a key, re-order the list of file locations so that it runs
> from least specific to most specific.  Then add a paragraph which simply
> says that the last value will be used.
Makes sense.
Show 6 quoted lines
>  file is not available or readable, 'git config' will exit with a non-zero
>  error code. However, in neither case will an error message be issued.
>  
> +The files are read in the order given above, with last value found taking
> +precedence over values read earlier.  When multiple values are taken then all
> +values of a key from all files will be used.
What order do the values come in --get-all?

If you read carefully, I think it is implied by the "files are read in order given above", but it took me a minute to think about it. Maybe add at the end:

  ...values of a key from all files will be shown, in the order the
  files are processed (least specific to most specific).

Or something (I do not like "least specific" because we have not introduced that term earlier, but I can't think of another succinct way to say it).

But even without that, the patch is certainly an improvement.
-Peff
Previous: John Keeping
Message 7 of 7 in “git-config: update doc for --get with multiple values”
  1. git-config: update doc for --get with multiple valuesJohn Keeping, Jul 3, 2013
  2. Jeff KingJul 3, 2013
  3. Junio C HamanoJul 3, 2013
  4. John KeepingJul 7, 2013
  5. Junio C HamanoJul 7, 2013
  6. git-config(1): clarify precedence of multiple valuesJohn Keeping, Jul 7, 2013
  7. Jeff KingJul 7, 2013

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.