summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d314ce)
raw | patch | inline | side by side (parent: 0d314ce)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Mon, 30 Aug 2010 09:50:42 +0000 (11:50 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Aug 2010 19:12:02 +0000 (12:12 -0700) |
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>
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>
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index b51d2e13a60352c652db35e812b6949dea4d0f56..44263ade2533b848220c234441ab67813ca2b0b4 100644 (file)
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
. ./test-lib.sh
unset CVS_SERVER
-# for clean cvsps cache
-HOME=$(pwd)
-export HOME
if ! type cvs >/dev/null 2>&1
then
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 7a7599987abebd953c385594691a9f04aefa41fa..7fe8883ae060947da804abb5b287fb94d19e87c4 100755 (executable)
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
mkdir templatedir-source &&
echo Content >templatedir-source/file &&
(
- HOME="`pwd`" &&
- export HOME &&
test_config="${HOME}/.gitconfig" &&
git config -f "$test_config" init.templatedir "${HOME}/templatedir-source" &&
mkdir templatedir-set &&
test_expect_success 'init --bare/--shared overrides system/global config' '
(
- HOME="`pwd`" &&
- export HOME &&
test_config="$HOME"/.gitconfig &&
unset GIT_CONFIG_NOGLOBAL &&
git config -f "$test_config" core.bare false &&
test_expect_success 'init honors global core.sharedRepository' '
(
- HOME="`pwd`" &&
- export HOME &&
test_config="$HOME"/.gitconfig &&
unset GIT_CONFIG_NOGLOBAL &&
git config -f "$test_config" core.sharedRepository 0666 &&
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 8abb71afcd4d7389260baa6f82ecb9b53bb9524c..8617965ec05d7d8789bcc455011650ad76cc7f2a 100755 (executable)
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
test_expect_success 'clone respects global branch.autosetuprebase' '
(
- HOME=$(pwd) &&
- export HOME &&
test_config="$HOME/.gitconfig" &&
unset GIT_CONFIG_NOGLOBAL &&
git config -f "$test_config" branch.autosetuprebase remote &&
index 134411e0a56142930a418ca15bd0902837c7bdc1..d5ee39ae9eba3f81823d51443939c00458eed4f5 100755 (executable)
(
rm -r "$GIT_DIR" &&
test x = x"$(git config svn.authorsfile)" &&
- HOME="`pwd`" &&
- export HOME &&
test_config="$HOME"/.gitconfig &&
unset GIT_CONFIG_NOGLOBAL &&
unset GIT_DIR &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7c9fe7ab42e0e88d7a64a979eb1b28a217f01b99..67553f3dfc5146203707994fa122db1c7533b235 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
# 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