@@ -1627,6 +1627,21 @@ test_expect_success 'urlmatch' '
test_cmp expect actual
'
+test_expect_success 'urlmatch with --show-scope' '
+ cat >.git/config <<-\EOF &&
+ [http "https://weak.example.com"]
+ sslVerify = false
+ cookieFile = /tmp/cookie.txt
+ EOF
+
+ cat >expect <<-EOF &&
+ unknown http.cookiefile /tmp/cookie.txt
+ unknown http.sslverify false
+ EOF
+ git config --get-urlmatch --show-scope HTTP https://weak.example.com >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'urlmatch favors more specific URLs' '
cat >.git/config <<-\EOF &&
[http "https://example.com/"]
@@ -2014,6 +2029,10 @@ test_expect_success '--show-origin blob ref' '
test_cmp expect output
'
+test_expect_success '--show-origin with --default' '
+ test_must_fail git config --show-origin --default foo some.key
+'
+
test_expect_success '--show-scope with --list' '
cat >expect <<-EOF &&
global user.global=true
@@ -2082,6 +2101,12 @@ test_expect_success '--show-scope with --show-origin' '
test_cmp expect output
'
+test_expect_success '--show-scope with --default' '
+ git config --show-scope --default foo some.key >actual &&
+ echo "unknown foo" >expect &&
+ test_cmp expect actual
+'
+
test_expect_success 'override global and system config' '
test_when_finished rm -f \"\$HOME\"/.gitconfig &&
cat >"$HOME"/.gitconfig <<-EOF &&