summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 347c47e)
raw | patch | inline | side by side (parent: 347c47e)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 7 Sep 2010 01:42:54 +0000 (20:42 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 9 Sep 2010 22:56:20 +0000 (15:56 -0700) |
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>
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>
22 files changed:
index c36157a8960c177fe316a7e0d13df179a5837b34..0d0da17eb8098b64c9165c8fad29baa8be17da43 100755 (executable)
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
one) echo pass one ;;
*) echo bad one; exit 1 ;;
esac &&
- (cd dir &&
- git update-index --add two &&
- case "`git ls-files`" in
- two) echo pass two ;;
- *) echo bad two; exit 1 ;;
- esac
+ (
+ cd dir &&
+ git update-index --add two &&
+ case "`git ls-files`" in
+ two) echo pass two ;;
+ *) echo bad two; exit 1 ;;
+ esac
) &&
case "`git ls-files`" in
dir/two"$LF"one) echo pass both ;;
index c94871993182df3aae4cbfbc57555b17877bd49b..0da27997c2e67c906cef819d06acabbd6c91c2a5 100755 (executable)
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
test_expect_success 'gitdir not required mode' '
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' '
(git apply --check --index test.patch &&
index 25afb4faebc63a21a30024017820f91c6499776d..61c1f53d1b75302be60396d2e01ccd5da5b6e5b4 100755 (executable)
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' '
-
- (cd sub && git ls-files --with-tree=HEAD~1 >../output)
-
+ # We have to run from a sub-directory to trigger prune_path
+ # Then we finally get to run our --with-tree test
+ (
+ cd sub &&
+ git ls-files --with-tree=HEAD~1 >../output
+ )
'
test_expect_success \
index 1a362d231a21a03673cc41281db12673363894e1..74161a42ec34c2d33780a80425ec1be5a4028f03 100755 (executable)
git commit -m "Add different B" &&
git clone ./. clone2 &&
- (cd clone2 &&
- git checkout -b topic origin/topic &&
- test_must_fail git merge origin/master &&
- echo Resolved > B &&
- git add B &&
- git commit -m "Merge origin/master into topic"
+ (
+ cd clone2 &&
+ git checkout -b topic origin/topic &&
+ test_must_fail git merge origin/master &&
+ echo Resolved >B &&
+ git add B &&
+ git commit -m "Merge origin/master into topic"
) &&
git checkout topic &&
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 056bc2b2486ff4621aa0182f97ec149101877761..a283dca25fe9b5d75841626337e0e68244fdbbf2 100755 (executable)
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
test_expect_success 'unstashing in a subdirectory' '
git reset --hard HEAD &&
mkdir subdir &&
- (cd subdir &&
- git stash apply
+ (
+ cd subdir &&
+ git stash apply
)
'
index 737c3d93ff7bf332120e31ad610396588e4a42df..995bdfafecedf6b629acdb3300732a4bb691f23c 100755 (executable)
"
commit_file sm1 &&
-head3=$(cd sm1 &&
-git reset --hard HEAD~2 >/dev/null &&
-git rev-parse --verify HEAD | cut -c1-7
+head3=$(
+ cd sm1 &&
+ git reset --hard HEAD~2 >/dev/null &&
+ git rev-parse --verify HEAD | cut -c1-7
)
test_expect_success 'modified submodule(backward)' "
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 34d59d5766841ac03eabfd9bcd152bda7618c207..7d1c866e13fb8992329369a5f72c2d28af557fd1 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
test_expect_success "clone and setup child repos" '
git clone . one &&
- (cd one &&
- echo >file updated by one &&
- git commit -a -m "updated by one"
+ (
+ cd one &&
+ echo >file updated by one &&
+ git commit -a -m "updated by one"
) &&
git clone . two &&
- (cd two &&
- git config branch.master.remote one &&
- git config remote.one.url ../one/.git/ &&
- git config remote.one.fetch refs/heads/master:refs/heads/one
+ (
+ cd two &&
+ git config branch.master.remote one &&
+ git config remote.one.url ../one/.git/ &&
+ git config remote.one.fetch refs/heads/master:refs/heads/one
) &&
git clone . three &&
- (cd three &&
- git config branch.master.remote two &&
- git config branch.master.merge refs/heads/one &&
- mkdir -p .git/remotes &&
- {
- echo "URL: ../two/.git/"
- echo "Pull: refs/heads/master:refs/heads/two"
- echo "Pull: refs/heads/one:refs/heads/one"
- } >.git/remotes/two
+ (
+ cd three &&
+ git config branch.master.remote two &&
+ git config branch.master.merge refs/heads/one &&
+ mkdir -p .git/remotes &&
+ {
+ echo "URL: ../two/.git/"
+ echo "Pull: refs/heads/master:refs/heads/two"
+ echo "Pull: refs/heads/one:refs/heads/one"
+ } >.git/remotes/two
) &&
git clone . bundle &&
git clone . seven
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 1911802355e654c132ce8febb42270040c96a20b..c907523e7e04542c6aada74f9b355ebcbae8c562 100755 (executable)
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
test_expect_success 'repack, clone and fetch work' '
git repack -a -d &&
git clone --no-hardlinks . clone_dir &&
- (cd clone_dir &&
- git show HEAD~5 | grep "A U Thor" &&
- git show $HASH2 | grep "A U Thor" &&
- git cat-file commit $R &&
- git repack -a -d &&
- test_must_fail git cat-file commit $R &&
- git fetch ../ "refs/replace/*:refs/replace/*" &&
- git show HEAD~5 | grep "O Thor" &&
- git show $HASH2 | grep "O Thor" &&
- git cat-file commit $R
+ (
+ cd clone_dir &&
+ git show HEAD~5 | grep "A U Thor" &&
+ git show $HASH2 | grep "A U Thor" &&
+ git cat-file commit $R &&
+ git repack -a -d &&
+ test_must_fail git cat-file commit $R &&
+ git fetch ../ "refs/replace/*:refs/replace/*" &&
+ git show HEAD~5 | grep "O Thor" &&
+ git show $HASH2 | grep "O Thor" &&
+ git cat-file commit $R
)
'
test_expect_success 'push to cloned repo' '
git push cloned $HASH6^:refs/heads/parallel &&
- (cd clone_dir &&
- git checkout parallel &&
- git log --pretty=oneline | grep $PARA2
+ (
+ cd clone_dir &&
+ git checkout parallel &&
+ git log --pretty=oneline | grep $PARA2
)
'
git show $HASH6~2 | grep "O Thor" &&
git show $PARA3 | grep "O Thor" &&
git push cloned $HASH6^:refs/heads/parallel2 &&
- (cd clone_dir &&
- git checkout parallel2 &&
- git log --pretty=oneline | grep $PARA3 &&
- git show $PARA3 | grep "A U Thor"
+ (
+ cd clone_dir &&
+ git checkout parallel2 &&
+ git log --pretty=oneline | grep $PARA3 &&
+ git show $PARA3 | grep "A U Thor"
)
'
test_expect_success 'fetch branch with replacement' '
git branch tofetch $HASH6 &&
- (cd clone_dir &&
- git fetch origin refs/heads/tofetch:refs/heads/parallel3
- git log --pretty=oneline parallel3 | grep $PARA3
- git show $PARA3 | grep "A U Thor"
+ (
+ cd clone_dir &&
+ git fetch origin refs/heads/tofetch:refs/heads/parallel3
+ git log --pretty=oneline parallel3 | grep $PARA3
+ git show $PARA3 | grep "A U Thor"
)
'
index 21b08395ce6da07842d4e993d2be50642748fae1..782b0a3ece7724bf8df7cf4d405715a42ad21d44 100755 (executable)
test_expect_success 'add submodules without specifying an explicit path' '
mkdir repo &&
- (cd repo &&
- git init &&
- echo r >r &&
- git add r &&
- git commit -m "repo commit 1"
+ (
+ cd repo &&
+ git init &&
+ echo r >r &&
+ git add r &&
+ git commit -m "repo commit 1"
) &&
git clone --bare repo/ bare.git &&
cd addtest &&
index b5ad45f447e2c03f74333f7b4078e1d43d8c4ea2..294584452bbc3226e631ce0b81c546b04cd8d992 100755 (executable)
"
commit_file sm1 &&
-head3=$(cd sm1 &&
-git reset --hard HEAD~2 >/dev/null &&
-git rev-parse --verify HEAD | cut -c1-7
+head3=$(
+ cd sm1 &&
+ git reset --hard HEAD~2 >/dev/null &&
+ git rev-parse --verify HEAD | cut -c1-7
)
test_expect_success 'modified submodule(backward)' "
index 34eb01797b3a289ded1dc92799616615f0c14784..2f458f7a999a69c623052898726567b9d7ce67c9 100755 (executable)
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
test_expect_success \
'initialize git svn' '
mkdir import &&
- (cd import &&
- echo foo > foo &&
- ln -s foo foo.link
- mkdir -p dir/a/b/c/d/e &&
- echo "deep dir" > dir/a/b/c/d/e/file &&
- mkdir bar &&
- echo "zzz" > bar/zzz &&
- echo "#!/bin/sh" > exec.sh &&
- chmod +x exec.sh &&
- svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
+ (
+ cd import &&
+ echo foo >foo &&
+ ln -s foo foo.link
+ mkdir -p dir/a/b/c/d/e &&
+ echo "deep dir" >dir/a/b/c/d/e/file &&
+ mkdir bar &&
+ echo "zzz" >bar/zzz &&
+ echo "#!/bin/sh" >exec.sh &&
+ chmod +x exec.sh &&
+ svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
) &&
rm -rf import &&
git svn init "$svnrepo"'
index f53a1a9ea6ce09342b3d8e79e69f3b351988c717..8869f5018ecd06636dc3e722cb518af88a6919d9 100755 (executable)
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
rm -rf import
test_expect_success 'checkout working copy from svn' 'svn co "$svnrepo" test_wc'
-test_expect_success 'setup some commits to svn' \
- '(cd test_wc &&
+test_expect_success 'setup some commits to svn' '
+ (
+ cd test_wc &&
echo Greetings >> kw.c &&
poke kw.c &&
svn_cmd commit -m "Not yet an Id" &&
svn_cmd propset svn:keywords Id kw.c &&
poke kw.c &&
svn_cmd commit -m "Propset Id"
- )'
+ )
+'
test_expect_success 'initialize git svn' 'git svn init "$svnrepo"'
test_expect_success 'fetch revisions from svn' 'git svn fetch'
got="`sed -ne 2p kw.c`"
test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'"
-test_expect_success "propset CR on crlf files" \
- '(cd test_wc &&
+test_expect_success "propset CR on crlf files" '
+ (
+ cd test_wc &&
svn_cmd propset svn:eol-style CR empty &&
svn_cmd propset svn:eol-style CR crlf &&
svn_cmd propset svn:eol-style CR ne_crlf &&
svn_cmd commit -m "propset CR on crlf files"
- )'
+ )
+'
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
'git svn fetch &&
EOF
test_expect_success 'test show-ignore' "
- (cd test_wc &&
- mkdir -p deeply/nested/directory &&
- touch deeply/nested/directory/.keep &&
- svn_cmd add deeply &&
- svn_cmd up &&
- svn_cmd propset -R svn:ignore '
+ (
+ cd test_wc &&
+ mkdir -p deeply/nested/directory &&
+ touch deeply/nested/directory/.keep &&
+ svn_cmd add deeply &&
+ svn_cmd up &&
+ svn_cmd propset -R svn:ignore '
no-such-file*
' .
- svn_cmd commit -m 'propset svn:ignore'
+ svn_cmd commit -m 'propset svn:ignore'
) &&
git svn show-ignore > show-ignore.got &&
cmp show-ignore.expect show-ignore.got
- "
+"
cat >create-ignore.expect <<\EOF
/no-such-file*
index d60a8efac29a551dd93d2bb3ec1b7a2a19dfad45..eb70f4839ccb065425b5ad8d40b270178dedef1b 100755 (executable)
test_expect_success 'initialize repo' '
mkdir import &&
- (cd import &&
- mkdir -p deeply/nested/directory/number/1 &&
- mkdir -p deeply/nested/directory/number/2 &&
- echo foo > deeply/nested/directory/number/1/file &&
- echo foo > deeply/nested/directory/number/2/another &&
- svn_cmd import -m "import for git svn" . "$svnrepo"
+ (
+ cd import &&
+ mkdir -p deeply/nested/directory/number/1 &&
+ mkdir -p deeply/nested/directory/number/2 &&
+ echo foo >deeply/nested/directory/number/1/file &&
+ echo foo >deeply/nested/directory/number/2/another &&
+ svn_cmd import -m "import for git svn" . "$svnrepo"
)
'
index 236e7de9a9251a22a0eabe1e723aa77b31369508..f7f3c5ab8ef8dd822a51d6c97281ba077c511642 100755 (executable)
test_expect_success 'initialize repo' '
mkdir import &&
- (cd import &&
- mkdir -p trunk &&
- echo hello > trunk/readme &&
- svn_cmd import -m "initial" . "$svnrepo"
+ (
+ cd import &&
+ mkdir -p trunk &&
+ echo hello >trunk/readme &&
+ svn_cmd import -m "initial" . "$svnrepo"
) &&
svn_cmd co "$svnrepo" wc &&
- (cd wc &&
- echo world >> trunk/readme &&
- poke trunk/readme &&
- svn_cmd commit -m "another commit" &&
- svn_cmd up &&
- svn_cmd mv trunk thunk &&
- echo goodbye >> thunk/readme &&
- poke thunk/readme &&
- svn_cmd commit -m "bye now"
+ (
+ cd wc &&
+ echo world >>trunk/readme &&
+ poke trunk/readme &&
+ svn_cmd commit -m "another commit" &&
+ svn_cmd up &&
+ svn_cmd mv trunk thunk &&
+ echo goodbye >>thunk/readme &&
+ poke thunk/readme &&
+ svn_cmd commit -m "bye now"
)
'
'
test_expect_success 'follow higher-level parent' '
- svn mkdir -m "follow higher-level parent" "$svnrepo"/blob &&
- svn co "$svnrepo"/blob blob &&
- (cd blob &&
- echo hi > hi &&
- svn add hi &&
+ svn mkdir -m "follow higher-level parent" "$svnrepo"/blob &&
+ svn co "$svnrepo"/blob blob &&
+ (
+ cd blob &&
+ echo hi > hi &&
+ svn add hi &&
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 &&
+ ) &&
+ 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 &&
git svn fetch -i blob
'
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 import &&
+ svn import -m "r9270 test" . "$svnrepo"/r9270
) &&
svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl 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 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"
) &&
git svn init --minimize-url -i r9270-t \
"$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t &&
index d432d835aeef1dafebf1c358a2c25009bc5df00e..5d0afeae6caf03ca34d7ef883baed512bcbcec51 100755 (executable)
test_expect_success 'initialize repo' '
mkdir import &&
- (cd import &&
- echo hello > readme &&
- svn_cmd import -m "initial" . "$svnrepo"
+ (
+ cd import &&
+ echo hello >readme &&
+ svn_cmd import -m "initial" . "$svnrepo"
) &&
echo hello > readme &&
git update-index --add readme &&
index af367a18143ff36cc6388d840fc0307322d148cf..f6d7ac7c5f67871ce332716561ea6aba7a6f920f 100755 (executable)
test_expect_success 'initialize repo' '
mkdir import &&
- (cd import &&
- echo initial > file &&
- svn_cmd import -m "initial" . "$svnrepo"
+ (
+ cd import &&
+ echo initial >file &&
+ svn_cmd import -m "initial" . "$svnrepo"
) &&
echo initial > file &&
git update-index --add file &&
'
test_expect_success 'commit change from svn side' '
svn_cmd co "$svnrepo" t.svn &&
- (cd t.svn &&
- echo second line from svn >> file &&
- poke file &&
- svn_cmd commit -m "second line from svn"
+ (
+ cd t.svn &&
+ echo second line from svn >>file &&
+ poke file &&
+ svn_cmd commit -m "second line from svn"
) &&
rm -rf t.svn
'
git svn fetch &&
git reset --hard refs/${remotes_git_svn} &&
svn_cmd co "$svnrepo" t.svn &&
- (cd t.svn &&
- echo fourth line from svn >> file &&
- poke file &&
- svn_cmd commit -m "fourth line from svn"
+ (
+ cd t.svn &&
+ echo fourth line from svn >>file &&
+ poke file &&
+ svn_cmd commit -m "fourth line from svn"
) &&
rm -rf t.svn &&
echo "fourth line from git" >> file &&
test_expect_success 'commit another change from svn side' '
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 &&
svn_cmd commit -m "third line from svn"
) &&
index f60b30699b765fe76c779fa49f44368de7a1b9d5..289fc313fb737ac7895580fd8407cff758b085e7 100755 (executable)
test_expect_success 'setup old-looking metadata' '
cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn &&
mkdir import &&
- (cd import &&
- for i in trunk branches/a branches/b \
- tags/0.1 tags/0.2 tags/0.3; do
- mkdir -p $i && \
- echo hello >> $i/README || exit 1
- done && \
+ (
+ cd import &&
+ for i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3
+ do
+ mkdir -p $i &&
+ echo hello >>$i/README ||
+ exit 1
+ done &&
svn_cmd import -m test . "$svnrepo"
- ) &&
+ ) &&
git svn init "$svnrepo" &&
git svn fetch &&
rm -rf "$GIT_DIR"/svn &&
index a7d0c7d99e936a98e2c45a4fd2999de254b92ff8..3077851015879fc147ded9bb573d02c13967eec9 100755 (executable)
test_expect_success 'setup svn repository' '
svn_cmd co "$svnrepo" mysvnwork &&
mkdir -p mysvnwork/trunk &&
- (cd mysvnwork &&
- big_text_block >> trunk/README &&
+ (
+ cd mysvnwork &&
+ big_text_block >>trunk/README &&
svn_cmd add trunk &&
svn_cmd ci -m "first commit" trunk
- )
+ )
'
test_expect_success 'setup git mirror and merge' '
index 9fdbc9bc95573566aaa73b9599be9cc1305b10d0..6a48e4042996549e40843186783e2215beee9cca 100755 (executable)
test_expect_success 'clone the repository to 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 commit -m test-rebase
- )
+ )
'
test_expect_success 'make a commit to test rebase' '
diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh
index 244b5cd3cfed681c83145097232a3dede5ad3034..5d477e4bdadd2168d0331e2ab809c5c86c8fa532 100755 (executable)
--- a/t/t9116-git-svn-log.sh
+++ b/t/t9116-git-svn-log.sh
test_expect_success 'setup repository and import' '
mkdir import &&
- (cd import &&
- for i in trunk branches/a branches/b \
- tags/0.1 tags/0.2 tags/0.3; do
- mkdir -p $i && \
- echo hello >> $i/README || exit 1
- done && \
+ (
+ cd import &&
+ for i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3
+ do
+ mkdir -p $i &&
+ echo hello >>$i/README ||
+ exit 1
+ done &&
svn_cmd import -m test . "$svnrepo"
- ) &&
+ ) &&
git svn init "$svnrepo" -T trunk -b branches -t tags &&
git svn fetch &&
git reset --hard trunk &&
index e3f08c448eaf1f6b5ee0665e5a830727b35a2092..f3f397cdda4766ce6c02beac13e492d406ca14c4 100755 (executable)
--- a/t/t9119-git-svn-info.sh
+++ b/t/t9119-git-svn-info.sh
test_expect_success 'setup repository and import' '
mkdir info &&
- (cd info &&
- echo FIRST > A &&
- echo one > file &&
+ (
+ cd info &&
+ echo FIRST >A &&
+ echo one >file &&
ln -s file symlink-file &&
mkdir directory &&
touch directory/.placeholder &&
svn_cmd import -m "initial" . "$svnrepo"
) &&
svn_cmd co "$svnrepo" svnwc &&
- (cd svnwc &&
- echo foo > foo &&
+ (
+ cd svnwc &&
+ echo foo >foo &&
svn_cmd add foo &&
svn_cmd commit -m "change outside directory" &&
svn_cmd update
) &&
mkdir gitwc &&
- (cd gitwc &&
+ (
+ cd gitwc &&
git svn init "$svnrepo" &&
git svn fetch
) &&
test_expect_success 'info added-file' "
echo two > gitwc/added-file &&
- (cd gitwc &&
+ (
+ cd gitwc &&
git add added-file
) &&
cp gitwc/added-file svnwc/added-file &&
ptouch gitwc/added-file svnwc/added-file &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd add added-file > /dev/null
) &&
(cd svnwc; svn info added-file) > expected.info-added-file &&
mkdir gitwc/added-directory svnwc/added-directory &&
ptouch gitwc/added-directory svnwc/added-directory &&
touch gitwc/added-directory/.placeholder &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd add added-directory > /dev/null
) &&
- (cd gitwc &&
+ (
+ cd gitwc &&
git add added-directory
) &&
(cd svnwc; svn info added-directory) \
'
test_expect_success 'info added-symlink-file' "
- (cd gitwc &&
+ (
+ cd gitwc &&
ln -s added-file added-symlink-file &&
git add added-symlink-file
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
ln -s added-file added-symlink-file &&
svn_cmd add added-symlink-file > /dev/null
) &&
'
test_expect_success 'info added-symlink-directory' "
- (cd gitwc &&
+ (
+ cd gitwc &&
ln -s added-directory added-symlink-directory &&
git add added-symlink-directory
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
ln -s added-directory added-symlink-directory &&
svn_cmd add added-symlink-directory > /dev/null
) &&
# simply reuses the Last Changed Date.
test_expect_success 'info deleted-file' "
- (cd gitwc &&
+ (
+ cd gitwc &&
git rm -f file > /dev/null
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd rm --force file > /dev/null
) &&
(cd svnwc; svn info file) |
'
test_expect_success 'info deleted-directory' "
- (cd gitwc &&
+ (
+ cd gitwc &&
git rm -r -f directory > /dev/null
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd rm --force directory > /dev/null
) &&
(cd svnwc; svn info directory) |
'
test_expect_success 'info deleted-symlink-file' "
- (cd gitwc &&
+ (
+ cd gitwc &&
git rm -f symlink-file > /dev/null
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd rm --force symlink-file > /dev/null
) &&
(cd svnwc; svn info symlink-file) |
'
test_expect_success 'info deleted-symlink-directory' "
- (cd gitwc &&
+ (
+ cd gitwc &&
git rm -f symlink-directory > /dev/null
) &&
- (cd svnwc &&
+ (
+ cd svnwc &&
svn_cmd rm --force symlink-directory > /dev/null
) &&
(cd svnwc; svn info symlink-directory) |
'
test_expect_success 'info unknown-symlink-file' "
- (cd gitwc &&
+ (
+ cd gitwc &&
ln -s unknown-file unknown-symlink-file
) &&
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \
'
test_expect_success 'info unknown-symlink-directory' "
- (cd gitwc &&
+ (
+ cd gitwc &&
ln -s unknown-directory unknown-symlink-directory
) &&
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
diff --git a/t/t9120-git-svn-clone-with-percent-escapes.sh b/t/t9120-git-svn-clone-with-percent-escapes.sh
index cddb9d4fc4c8aa9f62aec039938e71d79e5853b5..1d92c05035f8fe68885a6338ceca4307f19e8663 100755 (executable)
test_expect_success 'test clone with percent escapes' '
git svn clone "$svnrepo/pr%20ject" clone &&
- (cd clone &&
+ (
+ cd clone &&
git rev-parse refs/${remotes_git_svn}
)
'