diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 187ca2df5c81245256630428d3fc47567e0b4112..1d2bf2c06087546503b7272a9547ab8232b017d4 100755 (executable)
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect'
+test_expect_success 'alternative GIT_CONFIG (non-existing file should fail)' \
+ 'git config --file non-existing-config -l; test $? != 0'
+
cat > other-config << EOF
[ein]
bahn = strasse
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'
+
GIT_CONFIG=other-config git config anwohner.park ausweis
cat > expect << EOF