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

Re: git config --git-all can return non-zero error code

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2012, 00:10 UTC
Message-ID
<7vd2z9uobn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<50AABA9B.6090007@freescale.com>
Timur Tabi <timur@freescale.com> writes:
Show 8 quoted lines
> According to the man page for git-config, the --git-all option is not
> supposed to return an error code:
>
> --get-all
> 	Like get, but does not fail if the number of values for the key is
> 	not exactly one.
>
> IMHO, zero is also "not exactly one",...

It should have stated "like get, but unlike get, it does not fail when there are multiple values for the key", but the documentation was written with that specific knowledge that "--get" has a logic to make it fail when there are ambiguities, and wanted to stress that difference. It forgot to mention their similarity explicitly and relied on "Like get" part to mean (1) shows the value(s) given to the key, and (2) it is an error if there is no such key defined.

Previous: Timur TabiNext: Junio C Hamano
Message 2 of 3 in “git config --git-all can return non-zero error code”
  1. Timur TabiNov 19, 2012
  2. Junio C HamanoNov 20, 2012
  3. config --get-all: it is an error not to see any valueJunio C Hamano, Nov 20, 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.