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 21:12:02 +0200 |
commit | e4c62e640db3f704b4c27435c6b8efdb170988dc (patch) | |
tree | 0b3ca378eb4d5a915c6bb20998ad180383ee4520 /t/t0001-init.sh | |
parent | test-lib: use subshell instead of cd $new && .. && cd $old (diff) | |
download | git-e4c62e640db3f704b4c27435c6b8efdb170988dc.tar.xz git-e4c62e640db3f704b4c27435c6b8efdb170988dc.zip |
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/t0001-init.sh')
-rwxr-xr-x | t/t0001-init.sh | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 7a7599987a..7fe8883ae0 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -171,8 +171,6 @@ test_expect_success 'init with init.templatedir set' ' 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 && @@ -188,8 +186,6 @@ test_expect_success 'init with init.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 && @@ -205,8 +201,6 @@ test_expect_success 'init --bare/--shared overrides system/global config' ' 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 && |