Skip to content

Commit 8565d2d

Browse files
dschoJunio C Hamano
authored andcommitted
Make tests independent of global config files
This was done by setting $HOME to somewhere bogus. A better method is to reuse $GIT_CONFIG, which was invented for ignoring the global config file explicitely. Technically, setting GIT_CONFIG=.git/config could be wrong, but it passes all the tests, and we can keep the tests that way. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 32043c9 commit 8565d2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/test-lib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ test_done () {
255255
PATH=$(pwd)/..:$PATH
256256
GIT_EXEC_PATH=$(pwd)/..
257257
GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
258-
HOME=$(pwd)/trash
259-
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR HOME
258+
GIT_CONFIG=.git/config
259+
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG
260260

261261
GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
262262
export GITPERLLIB

0 commit comments

Comments
 (0)