summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-29 12:34:12 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-29 14:04:26 -0700
commitce7296cbf5aeec29bfbac329351969422c1e8804 (patch)
tree787697e7641e3e0e999f5300a52cc9e54efcfaf8
parenta684740994caebfaa7f18b9e07786d17931774f0 (diff)
downloadgit-ce7296cbf5aeec29bfbac329351969422c1e8804.tar.gz
t1300: take contents of system-wide configuration into account in "--list" test
One of the "git config" test tries to see that the command run without a valid repository still shows non-repository specific configuration. As we are planning to later make the system-wide file non-empty, prepare for the change by expecting to see the contents from it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t1300-repo-config.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index f28d0d325e..1b08d27392 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -344,10 +344,11 @@ test_expect_success 'working --list' '
git config --list > output &&
test_cmp expect output
'
-cat > expect << EOF
-EOF
-test_expect_success '--list without repo produces empty output' '
+test_expect_success '--list without repo shows only system-wide and global' '
+ # The global one aka $HOME/.gitconfig is missing,
+ # so we do not have to worry about it.
+ git config --system --list >expect &&
git --git-dir=nonexistent config --list >output &&
test_cmp expect output
'