HOME must be set before calling git-init when creating test repositories
Otherwise the created test repositories will be affected by users ~/.gitconfig. For example, setting core.logAllrefupdates in users config will make all calls to "git config --unset core.logAllrefupdates" fail which will break the first test which uses the statement and expects it to succeed. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alex Riesen committed
Mar 26, 2011 at 19:46 UTC
90cff968b3757061914f83b85a8d58cb9f29e72a
1 file changed
+3
-3
t/test-lib.sh
+3
-3
@@ -1004,14 +1004,14 @@ rm -fr "$test" || {
1004
exit 1
1005
}
1006
1007
+HOME="$TRASH_DIRECTORY"
1008
+export HOME
1009
+
1010
test_create_repo "$test"
1011
# Use -P to resolve symlinks in our working directory so that the cwd
1012
# in subprocesses like git equals our $PWD (for pathname comparisons).
1013
cd -P "$test" || exit 1
1014
1012
-HOME=$(pwd)
1013
-export HOME
1014
-
1015
this_test=${0##*/}
1016
this_test=${this_test%%-*}
1017
for skp in $GIT_SKIP_TESTS