Code

builtin-config: Fix crash when using "-f <relative path>" from non-root dir
[git.git] / t / t1300-repo-config.sh
index 43ea283242c4afc25e53d4a8c894140793649717..c81ccf2e56659b41787b9da69acbb3bf9f44f984 100755 (executable)
@@ -398,6 +398,17 @@ test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'
 test_expect_success 'alternative GIT_CONFIG (--file)' \
        'git config --file other-config -l > output && cmp output expect'
 
+test_expect_success 'refer config from subdirectory' '
+       mkdir x &&
+       (
+               cd x &&
+               echo strasse >expect
+               git config --get --file ../other-config ein.bahn >actual &&
+               test_cmp expect actual
+       )
+
+'
+
 GIT_CONFIG=other-config git config anwohner.park ausweis
 
 cat > expect << EOF