From: Jens Lehmann Date: Mon, 6 Sep 2010 18:41:06 +0000 (+0200) Subject: t3404 & t7508: cd inside subshell instead of around X-Git-Tag: v1.7.3-rc1~20 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c2e0940b44ded03f0af02be95c35b231fea633c1;p=git.git t3404 & t7508: cd inside subshell instead of around Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann Signed-off-by: Junio C Hamano --- diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index af3b663ae..7d20a74c5 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -101,10 +101,10 @@ test_expect_success 'rebase -i with the exec command' ' test_expect_success 'rebase -i with the exec command runs from tree root' ' git checkout master && - mkdir subdir && cd subdir && + mkdir subdir && (cd subdir && FAKE_LINES="1 exec_>touch-subdir" \ - git rebase -i HEAD^ && - cd .. && + git rebase -i HEAD^ + ) && test_path_is_file touch-subdir && rm -fr subdir ' diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 18b07d9d3..c9300f3c8 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -808,7 +808,7 @@ test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository' (exit $status) ' -(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar' && cd .. && git add sm) +(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar') && git add sm new_head=$(cd sm && git rev-parse --short=7 --verify HEAD) touch .gitmodules