aboutsummaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-02-28 11:54:35 +0000
committerJunio C Hamano <gitster@pobox.com>2016-02-28 12:01:45 -0800
commit27b30be686e497e6ab84dc0b25623df7aba1ba2c (patch)
tree048eedeb7dc98fa1ade92fb6d1fee205de64a6ef /t/t1300-repo-config.sh
parent326e5bc91eecf73234ead29636207bc516573e79 (diff)
downloadgit-27b30be686e497e6ab84dc0b25623df7aba1ba2c.tar.gz
git-27b30be686e497e6ab84dc0b25623df7aba1ba2c.tar.xz
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>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 52678e7d0..175e73cbb 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -1140,6 +1140,9 @@ test_expect_success 'urlmatch' '
cookieFile = /tmp/cookie.txt
EOF
+ test_expect_code 1 git config --bool --get-urlmatch doesnt.exist https://good.example.com >actual &&
+ test_must_be_empty actual &&
+
echo true >expect &&
git config --bool --get-urlmatch http.SSLverify https://good.example.com >actual &&
test_cmp expect actual &&