diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2010-08-30 11:50:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 12:12:02 -0700 |
commit | e4c62e640db3f704b4c27435c6b8efdb170988dc (patch) | |
tree | 0b3ca378eb4d5a915c6bb20998ad180383ee4520 /t/test-lib.sh | |
parent | 0d314ce834df9ad6bb5d6e9583c38aefd047fc9b (diff) | |
download | git-e4c62e640db3f704b4c27435c6b8efdb170988dc.tar.gz |
tests: factor HOME=$(pwd) in test-lib.sh
The same pattern is used in many tests, and makes it easy for new ones to
rely on $HOME being a trashable, clean, directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 7c9fe7ab42..67553f3dfc 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -865,6 +865,9 @@ test_create_repo "$test" # in subprocesses like git equals our $PWD (for pathname comparisons). cd -P "$test" || exit 1 +HOME=$(pwd) +export HOME + this_test=${0##*/} this_test=${this_test%%-*} for skp in $GIT_SKIP_TESTS |