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.