tests: subshell indentation stylefix

Format the subshells introduced by the previous patch (Several tests:
cd inside subshell instead of around, 2010-09-06) like so:

	(
		cd subdir &&
		...
	) &&

This is generally easier to read and has the nice side-effect that
this patch will show what commands are used in the subshell, making
it easier to check for lost environment variables and similar
behavior changes.

Cc: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Nieder 2010-09-06 20:42:54 -05:00 committed by Junio C Hamano
parent 347c47e61e
commit 18a8269242
22 changed files with 260 additions and 192 deletions

View File

@ -27,7 +27,8 @@ test_expect_success 'update-index and ls-files' '
one) echo pass one ;; one) echo pass one ;;
*) echo bad one; exit 1 ;; *) echo bad one; exit 1 ;;
esac && esac &&
(cd dir && (
cd dir &&
git update-index --add two && git update-index --add two &&
case "`git ls-files`" in case "`git ls-files`" in
two) echo pass two ;; two) echo pass two ;;

View File

@ -33,8 +33,15 @@ test_expect_success 'gitdir selection on unsupported repo' '
test_expect_success 'gitdir not required mode' ' test_expect_success 'gitdir not required mode' '
git apply --stat test.patch && git apply --stat test.patch &&
(cd test && git apply --stat ../test.patch) && (
(cd test2 && git apply --stat ../test.patch)' cd test &&
git apply --stat ../test.patch
) &&
(
cd test2 &&
git apply --stat ../test.patch
)
'
test_expect_success 'gitdir required mode on normal repos' ' test_expect_success 'gitdir required mode on normal repos' '
(git apply --check --index test.patch && (git apply --check --index test.patch &&

View File

@ -53,13 +53,13 @@ test_expect_success setup '
git add . git add .
' '
# We have to run from a sub-directory to trigger prune_path
# Then we finally get to run our --with-tree test
test_expect_success 'git -ls-files --with-tree should succeed from subdir' ' test_expect_success 'git -ls-files --with-tree should succeed from subdir' '
# We have to run from a sub-directory to trigger prune_path
(cd sub && git ls-files --with-tree=HEAD~1 >../output) # Then we finally get to run our --with-tree test
(
cd sub &&
git ls-files --with-tree=HEAD~1 >../output
)
' '
test_expect_success \ test_expect_success \

View File

@ -52,10 +52,11 @@ test_expect_success 'setup for merge-preserving rebase' \
git commit -m "Add different B" && git commit -m "Add different B" &&
git clone ./. clone2 && git clone ./. clone2 &&
(cd clone2 && (
cd clone2 &&
git checkout -b topic origin/topic && git checkout -b topic origin/topic &&
test_must_fail git merge origin/master && test_must_fail git merge origin/master &&
echo Resolved > B && echo Resolved >B &&
git add B && git add B &&
git commit -m "Merge origin/master into topic" git commit -m "Merge origin/master into topic"
) && ) &&

View File

@ -69,7 +69,8 @@ test_expect_success 'apply stashed changes (including index)' '
test_expect_success 'unstashing in a subdirectory' ' test_expect_success 'unstashing in a subdirectory' '
git reset --hard HEAD && git reset --hard HEAD &&
mkdir subdir && mkdir subdir &&
(cd subdir && (
cd subdir &&
git stash apply git stash apply
) )
' '

View File

@ -85,9 +85,10 @@ EOF
" "
commit_file sm1 && commit_file sm1 &&
head3=$(cd sm1 && head3=$(
git reset --hard HEAD~2 >/dev/null && cd sm1 &&
git rev-parse --verify HEAD | cut -c1-7 git reset --hard HEAD~2 >/dev/null &&
git rev-parse --verify HEAD | cut -c1-7
) )
test_expect_success 'modified submodule(backward)' " test_expect_success 'modified submodule(backward)' "

View File

@ -21,18 +21,21 @@ test_expect_success setup '
test_expect_success "clone and setup child repos" ' test_expect_success "clone and setup child repos" '
git clone . one && git clone . one &&
(cd one && (
cd one &&
echo >file updated by one && echo >file updated by one &&
git commit -a -m "updated by one" git commit -a -m "updated by one"
) && ) &&
git clone . two && git clone . two &&
(cd two && (
cd two &&
git config branch.master.remote one && git config branch.master.remote one &&
git config remote.one.url ../one/.git/ && git config remote.one.url ../one/.git/ &&
git config remote.one.fetch refs/heads/master:refs/heads/one git config remote.one.fetch refs/heads/master:refs/heads/one
) && ) &&
git clone . three && git clone . three &&
(cd three && (
cd three &&
git config branch.master.remote two && git config branch.master.remote two &&
git config branch.master.merge refs/heads/one && git config branch.master.merge refs/heads/one &&
mkdir -p .git/remotes && mkdir -p .git/remotes &&

View File

@ -104,7 +104,8 @@ test_expect_success '"git fsck" works' '
test_expect_success 'repack, clone and fetch work' ' test_expect_success 'repack, clone and fetch work' '
git repack -a -d && git repack -a -d &&
git clone --no-hardlinks . clone_dir && git clone --no-hardlinks . clone_dir &&
(cd clone_dir && (
cd clone_dir &&
git show HEAD~5 | grep "A U Thor" && git show HEAD~5 | grep "A U Thor" &&
git show $HASH2 | grep "A U Thor" && git show $HASH2 | grep "A U Thor" &&
git cat-file commit $R && git cat-file commit $R &&
@ -177,7 +178,8 @@ test_expect_success 'create parallel branch without the bug' '
test_expect_success 'push to cloned repo' ' test_expect_success 'push to cloned repo' '
git push cloned $HASH6^:refs/heads/parallel && git push cloned $HASH6^:refs/heads/parallel &&
(cd clone_dir && (
cd clone_dir &&
git checkout parallel && git checkout parallel &&
git log --pretty=oneline | grep $PARA2 git log --pretty=oneline | grep $PARA2
) )
@ -191,7 +193,8 @@ test_expect_success 'push branch with replacement' '
git show $HASH6~2 | grep "O Thor" && git show $HASH6~2 | grep "O Thor" &&
git show $PARA3 | grep "O Thor" && git show $PARA3 | grep "O Thor" &&
git push cloned $HASH6^:refs/heads/parallel2 && git push cloned $HASH6^:refs/heads/parallel2 &&
(cd clone_dir && (
cd clone_dir &&
git checkout parallel2 && git checkout parallel2 &&
git log --pretty=oneline | grep $PARA3 && git log --pretty=oneline | grep $PARA3 &&
git show $PARA3 | grep "A U Thor" git show $PARA3 | grep "A U Thor"
@ -200,7 +203,8 @@ test_expect_success 'push branch with replacement' '
test_expect_success 'fetch branch with replacement' ' test_expect_success 'fetch branch with replacement' '
git branch tofetch $HASH6 && git branch tofetch $HASH6 &&
(cd clone_dir && (
cd clone_dir &&
git fetch origin refs/heads/tofetch:refs/heads/parallel3 git fetch origin refs/heads/tofetch:refs/heads/parallel3
git log --pretty=oneline parallel3 | grep $PARA3 git log --pretty=oneline parallel3 | grep $PARA3
git show $PARA3 | grep "A U Thor" git show $PARA3 | grep "A U Thor"

View File

@ -413,7 +413,8 @@ test_expect_success 'submodule <invalid-path> warns' '
test_expect_success 'add submodules without specifying an explicit path' ' test_expect_success 'add submodules without specifying an explicit path' '
mkdir repo && mkdir repo &&
(cd repo && (
cd repo &&
git init && git init &&
echo r >r && echo r >r &&
git add r && git add r &&

View File

@ -66,9 +66,10 @@ EOF
" "
commit_file sm1 && commit_file sm1 &&
head3=$(cd sm1 && head3=$(
git reset --hard HEAD~2 >/dev/null && cd sm1 &&
git rev-parse --verify HEAD | cut -c1-7 git reset --hard HEAD~2 >/dev/null &&
git rev-parse --verify HEAD | cut -c1-7
) )
test_expect_success 'modified submodule(backward)' " test_expect_success 'modified submodule(backward)' "

View File

@ -22,14 +22,15 @@ esac
test_expect_success \ test_expect_success \
'initialize git svn' ' 'initialize git svn' '
mkdir import && mkdir import &&
(cd import && (
echo foo > foo && cd import &&
echo foo >foo &&
ln -s foo foo.link ln -s foo foo.link
mkdir -p dir/a/b/c/d/e && mkdir -p dir/a/b/c/d/e &&
echo "deep dir" > dir/a/b/c/d/e/file && echo "deep dir" >dir/a/b/c/d/e/file &&
mkdir bar && mkdir bar &&
echo "zzz" > bar/zzz && echo "zzz" >bar/zzz &&
echo "#!/bin/sh" > exec.sh && echo "#!/bin/sh" >exec.sh &&
chmod +x exec.sh && chmod +x exec.sh &&
svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
) && ) &&

View File

@ -53,8 +53,9 @@ cd ..
rm -rf import rm -rf import
test_expect_success 'checkout working copy from svn' 'svn co "$svnrepo" test_wc' test_expect_success 'checkout working copy from svn' 'svn co "$svnrepo" test_wc'
test_expect_success 'setup some commits to svn' \ test_expect_success 'setup some commits to svn' '
'(cd test_wc && (
cd test_wc &&
echo Greetings >> kw.c && echo Greetings >> kw.c &&
poke kw.c && poke kw.c &&
svn_cmd commit -m "Not yet an Id" && svn_cmd commit -m "Not yet an Id" &&
@ -64,7 +65,8 @@ test_expect_success 'setup some commits to svn' \
svn_cmd propset svn:keywords Id kw.c && svn_cmd propset svn:keywords Id kw.c &&
poke kw.c && poke kw.c &&
svn_cmd commit -m "Propset Id" svn_cmd commit -m "Propset Id"
)' )
'
test_expect_success 'initialize git svn' 'git svn init "$svnrepo"' test_expect_success 'initialize git svn' 'git svn init "$svnrepo"'
test_expect_success 'fetch revisions from svn' 'git svn fetch' test_expect_success 'fetch revisions from svn' 'git svn fetch'
@ -81,13 +83,15 @@ expect='/* $Id$ */'
got="`sed -ne 2p kw.c`" got="`sed -ne 2p kw.c`"
test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'" test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'"
test_expect_success "propset CR on crlf files" \ test_expect_success "propset CR on crlf files" '
'(cd test_wc && (
cd test_wc &&
svn_cmd propset svn:eol-style CR empty && svn_cmd propset svn:eol-style CR empty &&
svn_cmd propset svn:eol-style CR crlf && svn_cmd propset svn:eol-style CR crlf &&
svn_cmd propset svn:eol-style CR ne_crlf && svn_cmd propset svn:eol-style CR ne_crlf &&
svn_cmd commit -m "propset CR on crlf files" svn_cmd commit -m "propset CR on crlf files"
)' )
'
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \ test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
'git svn fetch && 'git svn fetch &&
@ -137,7 +141,8 @@ cat > show-ignore.expect <<\EOF
EOF EOF
test_expect_success 'test show-ignore' " test_expect_success 'test show-ignore' "
(cd test_wc && (
cd test_wc &&
mkdir -p deeply/nested/directory && mkdir -p deeply/nested/directory &&
touch deeply/nested/directory/.keep && touch deeply/nested/directory/.keep &&
svn_cmd add deeply && svn_cmd add deeply &&
@ -149,7 +154,7 @@ no-such-file*
) && ) &&
git svn show-ignore > show-ignore.got && git svn show-ignore > show-ignore.got &&
cmp show-ignore.expect show-ignore.got cmp show-ignore.expect show-ignore.got
" "
cat >create-ignore.expect <<\EOF cat >create-ignore.expect <<\EOF
/no-such-file* /no-such-file*

View File

@ -4,11 +4,12 @@ test_description='git svn rmdir'
test_expect_success 'initialize repo' ' test_expect_success 'initialize repo' '
mkdir import && mkdir import &&
(cd import && (
cd import &&
mkdir -p deeply/nested/directory/number/1 && mkdir -p deeply/nested/directory/number/1 &&
mkdir -p deeply/nested/directory/number/2 && mkdir -p deeply/nested/directory/number/2 &&
echo foo > deeply/nested/directory/number/1/file && echo foo >deeply/nested/directory/number/1/file &&
echo foo > deeply/nested/directory/number/2/another && echo foo >deeply/nested/directory/number/2/another &&
svn_cmd import -m "import for git svn" . "$svnrepo" svn_cmd import -m "import for git svn" . "$svnrepo"
) )
' '

View File

@ -8,19 +8,21 @@ test_description='git svn fetching'
test_expect_success 'initialize repo' ' test_expect_success 'initialize repo' '
mkdir import && mkdir import &&
(cd import && (
cd import &&
mkdir -p trunk && mkdir -p trunk &&
echo hello > trunk/readme && echo hello >trunk/readme &&
svn_cmd import -m "initial" . "$svnrepo" svn_cmd import -m "initial" . "$svnrepo"
) && ) &&
svn_cmd co "$svnrepo" wc && svn_cmd co "$svnrepo" wc &&
(cd wc && (
echo world >> trunk/readme && cd wc &&
echo world >>trunk/readme &&
poke trunk/readme && poke trunk/readme &&
svn_cmd commit -m "another commit" && svn_cmd commit -m "another commit" &&
svn_cmd up && svn_cmd up &&
svn_cmd mv trunk thunk && svn_cmd mv trunk thunk &&
echo goodbye >> thunk/readme && echo goodbye >>thunk/readme &&
poke thunk/readme && poke thunk/readme &&
svn_cmd commit -m "bye now" svn_cmd commit -m "bye now"
) )
@ -85,7 +87,8 @@ test_expect_success 'follow larger parent' '
test_expect_success 'follow higher-level parent' ' test_expect_success 'follow higher-level parent' '
svn mkdir -m "follow higher-level parent" "$svnrepo"/blob && svn mkdir -m "follow higher-level parent" "$svnrepo"/blob &&
svn co "$svnrepo"/blob blob && svn co "$svnrepo"/blob blob &&
(cd blob && (
cd blob &&
echo hi > hi && echo hi > hi &&
svn add hi && svn add hi &&
svn commit -m "hihi" svn commit -m "hihi"
@ -117,15 +120,20 @@ test_expect_success 'follow-parent avoids deleting relevant info' '
import/trunk/subversion/bindings/swig/perl/t/larger-parent && import/trunk/subversion/bindings/swig/perl/t/larger-parent &&
echo "bad delete test 2" > \ echo "bad delete test 2" > \
import/trunk/subversion/bindings/swig/perl/another-larger && import/trunk/subversion/bindings/swig/perl/another-larger &&
(cd import && (
cd import &&
svn import -m "r9270 test" . "$svnrepo"/r9270 svn import -m "r9270 test" . "$svnrepo"/r9270
) && ) &&
svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 && svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 &&
(cd r9270 && (
cd r9270 &&
svn mkdir native && svn mkdir native &&
svn mv t native/t && svn mv t native/t &&
for i in a b c; do svn mv $i.pm native/$i.pm; done && for i in a b c
echo z >> native/t/c.t && do
svn mv $i.pm native/$i.pm
done &&
echo z >>native/t/c.t &&
poke native/t/c.t && poke native/t/c.t &&
svn commit -m "reorg test" svn commit -m "reorg test"
) && ) &&

View File

@ -6,8 +6,9 @@ test_description='git svn commit-diff'
test_expect_success 'initialize repo' ' test_expect_success 'initialize repo' '
mkdir import && mkdir import &&
(cd import && (
echo hello > readme && cd import &&
echo hello >readme &&
svn_cmd import -m "initial" . "$svnrepo" svn_cmd import -m "initial" . "$svnrepo"
) && ) &&
echo hello > readme && echo hello > readme &&

View File

@ -6,8 +6,9 @@ test_description='git svn commit-diff clobber'
test_expect_success 'initialize repo' ' test_expect_success 'initialize repo' '
mkdir import && mkdir import &&
(cd import && (
echo initial > file && cd import &&
echo initial >file &&
svn_cmd import -m "initial" . "$svnrepo" svn_cmd import -m "initial" . "$svnrepo"
) && ) &&
echo initial > file && echo initial > file &&
@ -16,8 +17,9 @@ test_expect_success 'initialize repo' '
' '
test_expect_success 'commit change from svn side' ' test_expect_success 'commit change from svn side' '
svn_cmd co "$svnrepo" t.svn && svn_cmd co "$svnrepo" t.svn &&
(cd t.svn && (
echo second line from svn >> file && cd t.svn &&
echo second line from svn >>file &&
poke file && poke file &&
svn_cmd commit -m "second line from svn" svn_cmd commit -m "second line from svn"
) && ) &&
@ -44,8 +46,9 @@ test_expect_success 'dcommit fails to commit because of conflict' '
git svn fetch && git svn fetch &&
git reset --hard refs/${remotes_git_svn} && git reset --hard refs/${remotes_git_svn} &&
svn_cmd co "$svnrepo" t.svn && svn_cmd co "$svnrepo" t.svn &&
(cd t.svn && (
echo fourth line from svn >> file && cd t.svn &&
echo fourth line from svn >>file &&
poke file && poke file &&
svn_cmd commit -m "fourth line from svn" svn_cmd commit -m "fourth line from svn"
) && ) &&
@ -68,8 +71,9 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' "
test_expect_success 'commit another change from svn side' ' test_expect_success 'commit another change from svn side' '
svn_cmd co "$svnrepo" t.svn && svn_cmd co "$svnrepo" t.svn &&
(cd t.svn && (
echo third line from svn >> file && cd t.svn &&
echo third line from svn >>file &&
poke file && poke file &&
svn_cmd commit -m "third line from svn" svn_cmd commit -m "third line from svn"
) && ) &&

View File

@ -6,12 +6,14 @@ test_description='git svn metadata migrations from previous versions'
test_expect_success 'setup old-looking metadata' ' test_expect_success 'setup old-looking metadata' '
cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn && cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn &&
mkdir import && mkdir import &&
(cd import && (
for i in trunk branches/a branches/b \ cd import &&
tags/0.1 tags/0.2 tags/0.3; do for i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3
mkdir -p $i && \ do
echo hello >> $i/README || exit 1 mkdir -p $i &&
done && \ echo hello >>$i/README ||
exit 1
done &&
svn_cmd import -m test . "$svnrepo" svn_cmd import -m test . "$svnrepo"
) && ) &&
git svn init "$svnrepo" && git svn init "$svnrepo" &&

View File

@ -37,8 +37,9 @@ EOF
test_expect_success 'setup svn repository' ' test_expect_success 'setup svn repository' '
svn_cmd co "$svnrepo" mysvnwork && svn_cmd co "$svnrepo" mysvnwork &&
mkdir -p mysvnwork/trunk && mkdir -p mysvnwork/trunk &&
(cd mysvnwork && (
big_text_block >> trunk/README && cd mysvnwork &&
big_text_block >>trunk/README &&
svn_cmd add trunk && svn_cmd add trunk &&
svn_cmd ci -m "first commit" trunk svn_cmd ci -m "first commit" trunk
) )

View File

@ -61,8 +61,9 @@ test_expect_success 'add a file with plus signs' '
test_expect_success 'clone the repository to test rebase' ' test_expect_success 'clone the repository to test rebase' '
git svn clone "$svnrepo" test-rebase && git svn clone "$svnrepo" test-rebase &&
(cd test-rebase && (
echo test-rebase > test-rebase && cd test-rebase &&
echo test-rebase >test-rebase &&
git add test-rebase && git add test-rebase &&
git commit -m test-rebase git commit -m test-rebase
) )

View File

@ -8,12 +8,14 @@ test_description='git svn log tests'
test_expect_success 'setup repository and import' ' test_expect_success 'setup repository and import' '
mkdir import && mkdir import &&
(cd import && (
for i in trunk branches/a branches/b \ cd import &&
tags/0.1 tags/0.2 tags/0.3; do for i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3
mkdir -p $i && \ do
echo hello >> $i/README || exit 1 mkdir -p $i &&
done && \ echo hello >>$i/README ||
exit 1
done &&
svn_cmd import -m test . "$svnrepo" svn_cmd import -m test . "$svnrepo"
) && ) &&
git svn init "$svnrepo" -T trunk -b branches -t tags && git svn init "$svnrepo" -T trunk -b branches -t tags &&

View File

@ -39,9 +39,10 @@ quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/')"
test_expect_success 'setup repository and import' ' test_expect_success 'setup repository and import' '
mkdir info && mkdir info &&
(cd info && (
echo FIRST > A && cd info &&
echo one > file && echo FIRST >A &&
echo one >file &&
ln -s file symlink-file && ln -s file symlink-file &&
mkdir directory && mkdir directory &&
touch directory/.placeholder && touch directory/.placeholder &&
@ -49,14 +50,16 @@ test_expect_success 'setup repository and import' '
svn_cmd import -m "initial" . "$svnrepo" svn_cmd import -m "initial" . "$svnrepo"
) && ) &&
svn_cmd co "$svnrepo" svnwc && svn_cmd co "$svnrepo" svnwc &&
(cd svnwc && (
echo foo > foo && cd svnwc &&
echo foo >foo &&
svn_cmd add foo && svn_cmd add foo &&
svn_cmd commit -m "change outside directory" && svn_cmd commit -m "change outside directory" &&
svn_cmd update svn_cmd update
) && ) &&
mkdir gitwc && mkdir gitwc &&
(cd gitwc && (
cd gitwc &&
git svn init "$svnrepo" && git svn init "$svnrepo" &&
git svn fetch git svn fetch
) && ) &&
@ -138,12 +141,14 @@ test_expect_success 'info --url symlink-directory' '
test_expect_success 'info added-file' " test_expect_success 'info added-file' "
echo two > gitwc/added-file && echo two > gitwc/added-file &&
(cd gitwc && (
cd gitwc &&
git add added-file git add added-file
) && ) &&
cp gitwc/added-file svnwc/added-file && cp gitwc/added-file svnwc/added-file &&
ptouch gitwc/added-file svnwc/added-file && ptouch gitwc/added-file svnwc/added-file &&
(cd svnwc && (
cd svnwc &&
svn_cmd add added-file > /dev/null svn_cmd add added-file > /dev/null
) && ) &&
(cd svnwc; svn info added-file) > expected.info-added-file && (cd svnwc; svn info added-file) > expected.info-added-file &&
@ -160,10 +165,12 @@ test_expect_success 'info added-directory' "
mkdir gitwc/added-directory svnwc/added-directory && mkdir gitwc/added-directory svnwc/added-directory &&
ptouch gitwc/added-directory svnwc/added-directory && ptouch gitwc/added-directory svnwc/added-directory &&
touch gitwc/added-directory/.placeholder && touch gitwc/added-directory/.placeholder &&
(cd svnwc && (
cd svnwc &&
svn_cmd add added-directory > /dev/null svn_cmd add added-directory > /dev/null
) && ) &&
(cd gitwc && (
cd gitwc &&
git add added-directory git add added-directory
) && ) &&
(cd svnwc; svn info added-directory) \ (cd svnwc; svn info added-directory) \
@ -179,11 +186,13 @@ test_expect_success 'info --url added-directory' '
' '
test_expect_success 'info added-symlink-file' " test_expect_success 'info added-symlink-file' "
(cd gitwc && (
cd gitwc &&
ln -s added-file added-symlink-file && ln -s added-file added-symlink-file &&
git add added-symlink-file git add added-symlink-file
) && ) &&
(cd svnwc && (
cd svnwc &&
ln -s added-file added-symlink-file && ln -s added-file added-symlink-file &&
svn_cmd add added-symlink-file > /dev/null svn_cmd add added-symlink-file > /dev/null
) && ) &&
@ -202,11 +211,13 @@ test_expect_success 'info --url added-symlink-file' '
' '
test_expect_success 'info added-symlink-directory' " test_expect_success 'info added-symlink-directory' "
(cd gitwc && (
cd gitwc &&
ln -s added-directory added-symlink-directory && ln -s added-directory added-symlink-directory &&
git add added-symlink-directory git add added-symlink-directory
) && ) &&
(cd svnwc && (
cd svnwc &&
ln -s added-directory added-symlink-directory && ln -s added-directory added-symlink-directory &&
svn_cmd add added-symlink-directory > /dev/null svn_cmd add added-symlink-directory > /dev/null
) && ) &&
@ -230,10 +241,12 @@ test_expect_success 'info --url added-symlink-directory' '
# simply reuses the Last Changed Date. # simply reuses the Last Changed Date.
test_expect_success 'info deleted-file' " test_expect_success 'info deleted-file' "
(cd gitwc && (
cd gitwc &&
git rm -f file > /dev/null git rm -f file > /dev/null
) && ) &&
(cd svnwc && (
cd svnwc &&
svn_cmd rm --force file > /dev/null svn_cmd rm --force file > /dev/null
) && ) &&
(cd svnwc; svn info file) | (cd svnwc; svn info file) |
@ -251,10 +264,12 @@ test_expect_success 'info --url file (deleted)' '
' '
test_expect_success 'info deleted-directory' " test_expect_success 'info deleted-directory' "
(cd gitwc && (
cd gitwc &&
git rm -r -f directory > /dev/null git rm -r -f directory > /dev/null
) && ) &&
(cd svnwc && (
cd svnwc &&
svn_cmd rm --force directory > /dev/null svn_cmd rm --force directory > /dev/null
) && ) &&
(cd svnwc; svn info directory) | (cd svnwc; svn info directory) |
@ -272,10 +287,12 @@ test_expect_success 'info --url directory (deleted)' '
' '
test_expect_success 'info deleted-symlink-file' " test_expect_success 'info deleted-symlink-file' "
(cd gitwc && (
cd gitwc &&
git rm -f symlink-file > /dev/null git rm -f symlink-file > /dev/null
) && ) &&
(cd svnwc && (
cd svnwc &&
svn_cmd rm --force symlink-file > /dev/null svn_cmd rm --force symlink-file > /dev/null
) && ) &&
(cd svnwc; svn info symlink-file) | (cd svnwc; svn info symlink-file) |
@ -294,10 +311,12 @@ test_expect_success 'info --url symlink-file (deleted)' '
' '
test_expect_success 'info deleted-symlink-directory' " test_expect_success 'info deleted-symlink-directory' "
(cd gitwc && (
cd gitwc &&
git rm -f symlink-directory > /dev/null git rm -f symlink-directory > /dev/null
) && ) &&
(cd svnwc && (
cd svnwc &&
svn_cmd rm --force symlink-directory > /dev/null svn_cmd rm --force symlink-directory > /dev/null
) && ) &&
(cd svnwc; svn info symlink-directory) | (cd svnwc; svn info symlink-directory) |
@ -346,7 +365,8 @@ test_expect_success 'info --url unknown-directory' '
' '
test_expect_success 'info unknown-symlink-file' " test_expect_success 'info unknown-symlink-file' "
(cd gitwc && (
cd gitwc &&
ln -s unknown-file unknown-symlink-file ln -s unknown-file unknown-symlink-file
) && ) &&
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \ (cd gitwc; test_must_fail git svn info unknown-symlink-file) \
@ -361,7 +381,8 @@ test_expect_success 'info --url unknown-symlink-file' '
' '
test_expect_success 'info unknown-symlink-directory' " test_expect_success 'info unknown-symlink-directory' "
(cd gitwc && (
cd gitwc &&
ln -s unknown-directory unknown-symlink-directory ln -s unknown-directory unknown-symlink-directory
) && ) &&
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \ (cd gitwc; test_must_fail git svn info unknown-symlink-directory) \

View File

@ -20,7 +20,8 @@ test_expect_success 'setup svnrepo' '
test_expect_success 'test clone with percent escapes' ' test_expect_success 'test clone with percent escapes' '
git svn clone "$svnrepo/pr%20ject" clone && git svn clone "$svnrepo/pr%20ject" clone &&
(cd clone && (
cd clone &&
git rev-parse refs/${remotes_git_svn} git rev-parse refs/${remotes_git_svn}
) )
' '