aboutsummaryrefslogtreecommitdiff
path: root/t/t1500-rev-parse.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-02-06 05:11:53 -0500
committerJunio C Hamano <gitster@pobox.com>2008-02-06 14:52:28 -0800
commit8bfa6bd6473b086ab2c5781daa08a7b5417c3d1f (patch)
tree9cf72109b2e90725254b774bb0a2a7796e777e74 /t/t1500-rev-parse.sh
parentab88c36321df647e17d477f19591cf6ca95de7f0 (diff)
downloadgit-8bfa6bd6473b086ab2c5781daa08a7b5417c3d1f.tar.gz
git-8bfa6bd6473b086ab2c5781daa08a7b5417c3d1f.tar.xz
fix config reading in tests
Previously, we set the GIT_CONFIG environment variable in our tests so that only that file was read. However, setting it to a static value is not correct, since we are not necessarily always in the same directory; instead, we want the usual git config file lookup to happen. To do this, we stop setting GIT_CONFIG, which means that we must now suppress the reading of the system-wide and user configs. This exposes an incorrect test in t1500, which is also fixed (the incorrect test worked because we were failing to read the core.bare value from the config file, since the GIT_CONFIG variable was pointing us to the wrong file). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1500-rev-parse.sh')
-rwxr-xr-xt/t1500-rev-parse.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh
index e474b3f1d..38a2bf09a 100755
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
@@ -33,9 +33,9 @@ test_rev_parse() {
test_rev_parse toplevel false false true ''
cd .git || exit 1
-test_rev_parse .git/ true true false ''
+test_rev_parse .git/ false true false ''
cd objects || exit 1
-test_rev_parse .git/objects/ true true false ''
+test_rev_parse .git/objects/ false true false ''
cd ../.. || exit 1
mkdir -p sub/dir || exit 1