Skip to content

Commit

Permalink
t3404 & t7508: cd inside subshell instead of around
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Lehmann authored and Junio C Hamano committed Sep 6, 2010
1 parent 4682693 commit c2e0940
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions t/t3404-rebase-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down
2 changes: 1 addition & 1 deletion t/t7508-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c2e0940

Please sign in to comment.