diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2010-09-06 20:39:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-06 14:30:53 -0700 |
commit | fd4ec4f2bb980ce07bb28d5823a95610f251d00b (patch) | |
tree | 824a488c7708e4271f157f15c760947890a2e0bc /t/t9104-git-svn-follow-parent.sh | |
parent | af24059fa299f1656692f5807eddd3b30b5f3cfb (diff) | |
download | git-fd4ec4f2bb980ce07bb28d5823a95610f251d00b.tar.gz |
Several tests: 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>
Diffstat (limited to 't/t9104-git-svn-follow-parent.sh')
-rwxr-xr-x | t/t9104-git-svn-follow-parent.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index bbfd7f4793..236e7de9a9 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -8,13 +8,13 @@ test_description='git svn fetching' test_expect_success 'initialize repo' ' mkdir import && - cd import && + (cd import && mkdir -p trunk && echo hello > trunk/readme && - svn_cmd import -m "initial" . "$svnrepo" && - cd .. && + svn_cmd import -m "initial" . "$svnrepo" + ) && svn_cmd co "$svnrepo" wc && - cd wc && + (cd wc && echo world >> trunk/readme && poke trunk/readme && svn_cmd commit -m "another commit" && @@ -22,8 +22,8 @@ test_expect_success 'initialize repo' ' svn_cmd mv trunk thunk && echo goodbye >> thunk/readme && poke thunk/readme && - svn_cmd commit -m "bye now" && - cd .. + svn_cmd commit -m "bye now" + ) ' test_expect_success 'init and fetch a moved directory' ' @@ -85,11 +85,11 @@ test_expect_success 'follow larger parent' ' test_expect_success 'follow higher-level parent' ' svn mkdir -m "follow higher-level parent" "$svnrepo"/blob && svn co "$svnrepo"/blob blob && - cd blob && + (cd blob && echo hi > hi && svn add hi && - svn commit -m "hihi" && - cd .. + svn commit -m "hihi" + ) && svn mkdir -m "new glob at top level" "$svnrepo"/glob && svn mv -m "move blob down a level" "$svnrepo"/blob "$svnrepo"/glob/blob && git svn init --minimize-url -i blob "$svnrepo"/glob/blob && @@ -117,18 +117,18 @@ test_expect_success 'follow-parent avoids deleting relevant info' ' import/trunk/subversion/bindings/swig/perl/t/larger-parent && echo "bad delete test 2" > \ import/trunk/subversion/bindings/swig/perl/another-larger && - cd import && - svn import -m "r9270 test" . "$svnrepo"/r9270 && - cd .. && + (cd import && + svn import -m "r9270 test" . "$svnrepo"/r9270 + ) && svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 && - cd r9270 && + (cd r9270 && svn mkdir native && svn mv t native/t && for i in a b c; do svn mv $i.pm native/$i.pm; done && echo z >> native/t/c.t && poke native/t/c.t && - svn commit -m "reorg test" && - cd .. && + svn commit -m "reorg test" + ) && git svn init --minimize-url -i r9270-t \ "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t && git svn fetch -i r9270-t && |