{"thread":{"id":"25008","subject":"[PATCH] t3404 & t7508: cd inside subshell instead of around","startedAt":"2010-09-06T18:41:06Z","lastAt":"2010-09-06T18:41:06Z","messageCount":1,"participants":["Jens Lehmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"150108","messageId":"4C8535C2.5050203@web.de","threadId":"25008","inReplyTo":null,"subject":"[PATCH] t3404 & t7508: cd inside subshell instead of around","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2010-09-06T18:41:06Z","receivedAt":"2010-09-06T18:41:06Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Fixed all places where it was a straightforward change from cd'ing into a\ndirectory and back via \"cd ..\" to a cd inside a subshell.\n\nFound these places with \"git grep -w \"cd \\.\\.\".\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n\nThis patch applies on top of master and contains the changes that don't\napply to maint.\n\n t/t3404-rebase-interactive.sh |    6 +++---\n t/t7508-status.sh             |    2 +-\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex af3b663..7d20a74 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -101,10 +101,10 @@ test_expect_success 'rebase -i with the exec command' '\n\n test_expect_success 'rebase -i with the exec command runs from tree root' '\n \tgit checkout master &&\n-\tmkdir subdir && cd subdir &&\n+\tmkdir subdir && (cd subdir &&\n \tFAKE_LINES=\"1 exec_>touch-subdir\" \\\n-\t\tgit rebase -i HEAD^ &&\n-\tcd .. &&\n+\t\tgit rebase -i HEAD^\n+\t) &&\n \ttest_path_is_file touch-subdir &&\n \trm -fr subdir\n '\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 18b07d9..c9300f3 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -808,7 +808,7 @@ test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository'\n \t(exit $status)\n '\n\n-(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar' && cd .. && git add sm)\n+(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar') && git add sm\n new_head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n touch .gitmodules\n\n-- \n1.7.3.rc0.181.g885f40\n"}]}