summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-07-31 10:30:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-08-01 05:56:15 (GMT)
commit773a69fb09acfdfa2ce5566548d8a8a370a59fde (patch)
tree99b0a6b1182882c2d5e32eacd0ed309bc84d2e71 /t/t1300-repo-config.sh
parent67d454fed6ae1f127d2daa57db946df200f2382a (diff)
downloadgit-773a69fb09acfdfa2ce5566548d8a8a370a59fde.zip
git-773a69fb09acfdfa2ce5566548d8a8a370a59fde.tar.gz
git-773a69fb09acfdfa2ce5566548d8a8a370a59fde.tar.bz2
Add a test for git-config --file
Check for non-0 exit code if the confiog file does not exist and if it works exactly like when setting GIT_CONFIG. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 187ca2d..1d2bf2c 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -325,6 +325,9 @@ EOF
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
@@ -338,6 +341,9 @@ GIT_CONFIG=other-config git config -l > output
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