{"thread":{"id":"9326","subject":"[PATCH] Add a test for git-config --file","startedAt":"2007-07-31T11:53:49Z","lastAt":"2007-07-31T11:53:49Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49211","messageId":"81b0412b0707310453n5077a018ybbbfcf690fb82467@mail.gmail.com","threadId":"9326","inReplyTo":null,"subject":"[PATCH] Add a test for git-config --file","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-31T11:53:49Z","receivedAt":"2007-07-31T11:53:49Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Check for non-0 exit code if the confiog file does not exist and\nif it works exactly like when setting GIT_CONFIG.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\n\nFrom a5ae18f299d431053074c0ebdcf2d96a3ac9dff6 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Tue, 31 Jul 2007 12:30:52 +0200\nSubject: [PATCH] Add a test for git-config --file\n\nCheck for non-0 exit code if the confiog file does not exist and\nif it works exactly like when setting GIT_CONFIG.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 187ca2d..1d2bf2c 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -325,6 +325,9 @@ EOF\n \n test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect'\n \n+test_expect_success 'alternative GIT_CONFIG (non-existing file should fail)' \\\n+\t'git config --file non-existing-config -l; test $? != 0'\n+\n cat > other-config << EOF\n [ein]\n \tbahn = strasse\n@@ -338,6 +341,9 @@ GIT_CONFIG=other-config git config -l > output\n \n test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'\n \n+test_expect_success 'alternative GIT_CONFIG (--file)' \\\n+\t'git config --file other-config -l > output && cmp output expect'\n+\n GIT_CONFIG=other-config git config anwohner.park ausweis\n \n cat > expect << EOF\n-- \n1.5.3.rc3.132.g39179\n\n"}]}