Merge branch 'jk/repack-ref-racefix'
[gitweb.git] / t / t1300-repo-config.sh
index feb743019cae6e0060b132578d0b3fd9643217b0..3c96fda548709835e10f283df8cab667c280af81 100755 (executable)
@@ -254,12 +254,19 @@ test_expect_success 'non-match value' '
        test_cmp expect actual
 '
 
-test_expect_success 'ambiguous get' '
-       test_must_fail git config --get nextsection.nonewline
+test_expect_success 'multi-valued get returns final one' '
+       echo "wow2 for me" >expect &&
+       git config --get nextsection.nonewline >actual &&
+       test_cmp expect actual
 '
 
-test_expect_success 'get multivar' '
-       git config --get-all nextsection.nonewline
+test_expect_success 'multi-valued get-all returns all' '
+       cat >expect <<-\EOF &&
+       wow
+       wow2 for me
+       EOF
+       git config --get-all nextsection.nonewline >actual &&
+       test_cmp expect actual
 '
 
 cat > expect << EOF
@@ -277,10 +284,6 @@ test_expect_success 'multivar replace' '
        test_cmp expect .git/config
 '
 
-test_expect_success 'ambiguous value' '
-       test_must_fail git config nextsection.nonewline
-'
-
 test_expect_success 'ambiguous unset' '
        test_must_fail git config --unset nextsection.nonewline
 '
@@ -843,6 +846,11 @@ test_expect_success NOT_MINGW 'get --path copes with unset $HOME' '
        test_cmp expect result
 '
 
+test_expect_success 'get --path barfs on boolean variable' '
+       echo "[path]bool" >.git/config &&
+       test_must_fail git config --get --path path.bool
+'
+
 cat > expect << EOF
 [quote]
        leading = " test"