summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07431fc)
raw | patch | inline | side by side (parent: 07431fc)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Mon, 30 Aug 2010 12:00:42 +0000 (12:00 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Aug 2010 19:12:02 +0000 (12:12 -0700) |
Change the test_create_repo code added in v1.2.2~6 to use a subshell
instead of keeping track of the old working directory and cd-ing back
when it's done.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
instead of keeping track of the old working directory and cd-ing back
when it's done.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh | patch | blob | history |
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 198dd860a2ee49ef29cb3d46014a0bfe511f97f8..7c9fe7ab42e0e88d7a64a979eb1b28a217f01b99 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
test_create_repo () {
test "$#" = 1 ||
error "bug in the test script: not 1 parameter to test-create-repo"
- owd=`pwd`
repo="$1"
mkdir -p "$repo"
- cd "$repo" || error "Cannot setup test environment"
- "$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
- error "cannot run git init -- have you built things yet?"
- mv .git/hooks .git/hooks-disabled
- cd "$owd"
+ (
+ cd "$repo" || error "Cannot setup test environment"
+ "$GIT_EXEC_PATH/git-init" "--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
+ error "cannot run git init -- have you built things yet?"
+ mv .git/hooks .git/hooks-disabled
+ ) || exit
}
test_done () {