config: fail if --get-urlmatch finds no value
commit27b30be686e497e6ab84dc0b25623df7aba1ba2c
authorJohn Keeping <john@keeping.me.uk>
Sun, 28 Feb 2016 11:54:35 +0000 (28 11:54 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Feb 2016 20:01:45 +0000 (28 12:01 -0800)
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 <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-config.txt
builtin/config.c
t/t1300-repo-config.sh