config: fail if --get-urlmatch finds no value
authorJohn Keeping <redacted>
Sun, 28 Feb 2016 11:54:35 +0000 (11:54 +0000)
committerJunio C Hamano <redacted>
Sun, 28 Feb 2016 20:01:45 +0000 (12:01 -0800)
commit27b30be686e497e6ab84dc0b25623df7aba1ba2c
tree048eedeb7dc98fa1ade92fb6d1fee205de64a6ef
parent326e5bc91eecf73234ead29636207bc516573e79
config: fail if --get-urlmatch finds no value

The --get, --get-all and --get-regexp options to git-config exit with
status 1 if the key is not found but --get-urlmatch succeeds in this
case.

Change --get-urlmatch to behave in the same way as the other --get*
options so that all four are consistent.  --get-color is a special case
because it accepts a default value to return and so should not return an
error if the key is not found.

Also clarify this behaviour in the documentation.

Signed-off-by: John Keeping <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/git-config.txt
builtin/config.c
t/t1300-repo-config.sh
git clone https://git.99rst.org/PROJECT