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 <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann committed
Sep 6, 2010 at 20:41 UTC
c2e0940b44ded03f0af02be95c35b231fea633c1
2 files changed
+4
-4
t/t3404-rebase-interactive.sh
+3
-3
@@ -101,10 +101,10 @@ test_expect_success 'rebase -i with the exec command' '
101
102
test_expect_success 'rebase -i with the exec command runs from tree root' '
103
git checkout master &&
104
- mkdir subdir && cd subdir &&
104
+ mkdir subdir && (cd subdir &&
105
FAKE_LINES="1 exec_>touch-subdir" \
106
- git rebase -i HEAD^ &&
107
- cd .. &&
106
+ git rebase -i HEAD^
107
+ ) &&
108
test_path_is_file touch-subdir &&
109
rm -fr subdir
110
'
t/t7508-status.sh
+1
-1
@@ -808,7 +808,7 @@ test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository'
808
(exit $status)
809
'
810
811
-(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar' && cd .. && git add sm)
811
+(cd sm && echo > bar && git add bar && git commit -q -m 'Add bar') && git add sm
812
new_head=$(cd sm && git rev-parse --short=7 --verify HEAD)
813
touch .gitmodules
814