@@ -45,13 +45,13 @@ test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'
45
45
46
46
name=' try a deep --rmdir with a commit'
47
47
test_expect_success " $name " '
48
- git checkout -f -b mybranch ${remotes_git_svn} &&
48
+ git checkout -f -b mybranch remotes/git-svn &&
49
49
mv dir/a/b/c/d/e/file dir/file &&
50
50
cp dir/file file &&
51
51
git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
52
52
git commit -m "$name" &&
53
53
git svn set-tree --find-copies-harder --rmdir \
54
- ${remotes_git_svn} ..mybranch &&
54
+ remotes/git-svn ..mybranch &&
55
55
svn_cmd up "$SVN_TREE" &&
56
56
test -d "$SVN_TREE"/dir && test ! -d "$SVN_TREE"/dir/a'
57
57
@@ -65,37 +65,37 @@ test_expect_success "$name" "
65
65
git update-index --add dir/file/file &&
66
66
git commit -m '$name ' &&
67
67
test_must_fail git svn set-tree --find-copies-harder --rmdir \
68
- ${remotes_git_svn} ..mybranch
68
+ remotes/git-svn ..mybranch
69
69
"
70
70
71
71
72
72
name=' detect node change from directory to file #1'
73
73
test_expect_success " $name " '
74
74
rm -rf dir "$GIT_DIR"/index &&
75
- git checkout -f -b mybranch2 ${remotes_git_svn} &&
75
+ git checkout -f -b mybranch2 remotes/git-svn &&
76
76
mv bar/zzz zzz &&
77
77
rm -rf bar &&
78
78
mv zzz bar &&
79
79
git update-index --remove -- bar/zzz &&
80
80
git update-index --add -- bar &&
81
81
git commit -m "$name" &&
82
82
test_must_fail git svn set-tree --find-copies-harder --rmdir \
83
- ${remotes_git_svn} ..mybranch2
83
+ remotes/git-svn ..mybranch2
84
84
'
85
85
86
86
87
87
name=' detect node change from file to directory #2'
88
88
test_expect_success " $name " '
89
89
rm -f "$GIT_DIR"/index &&
90
- git checkout -f -b mybranch3 ${remotes_git_svn} &&
90
+ git checkout -f -b mybranch3 remotes/git-svn &&
91
91
rm bar/zzz &&
92
92
git update-index --remove bar/zzz &&
93
93
mkdir bar/zzz &&
94
94
echo yyy > bar/zzz/yyy &&
95
95
git update-index --add bar/zzz/yyy &&
96
96
git commit -m "$name" &&
97
97
git svn set-tree --find-copies-harder --rmdir \
98
- ${remotes_git_svn} ..mybranch3 &&
98
+ remotes/git-svn ..mybranch3 &&
99
99
svn_cmd up "$SVN_TREE" &&
100
100
test -d "$SVN_TREE"/bar/zzz &&
101
101
test -e "$SVN_TREE"/bar/zzz/yyy
@@ -104,27 +104,27 @@ test_expect_success "$name" '
104
104
name=' detect node change from directory to file #2'
105
105
test_expect_success " $name " '
106
106
rm -f "$GIT_DIR"/index &&
107
- git checkout -f -b mybranch4 ${remotes_git_svn} &&
107
+ git checkout -f -b mybranch4 remotes/git-svn &&
108
108
rm -rf dir &&
109
109
git update-index --remove -- dir/file &&
110
110
touch dir &&
111
111
echo asdf > dir &&
112
112
git update-index --add -- dir &&
113
113
git commit -m "$name" &&
114
114
test_must_fail git svn set-tree --find-copies-harder --rmdir \
115
- ${remotes_git_svn} ..mybranch4
115
+ remotes/git-svn ..mybranch4
116
116
'
117
117
118
118
119
119
name=' remove executable bit from a file'
120
120
test_expect_success POSIXPERM " $name " '
121
121
rm -f "$GIT_DIR"/index &&
122
- git checkout -f -b mybranch5 ${remotes_git_svn} &&
122
+ git checkout -f -b mybranch5 remotes/git-svn &&
123
123
chmod -x exec.sh &&
124
124
git update-index exec.sh &&
125
125
git commit -m "$name" &&
126
126
git svn set-tree --find-copies-harder --rmdir \
127
- ${remotes_git_svn} ..mybranch5 &&
127
+ remotes/git-svn ..mybranch5 &&
128
128
svn_cmd up "$SVN_TREE" &&
129
129
test ! -x "$SVN_TREE"/exec.sh'
130
130
@@ -135,7 +135,7 @@ test_expect_success POSIXPERM "$name" '
135
135
git update-index exec.sh &&
136
136
git commit -m "$name" &&
137
137
git svn set-tree --find-copies-harder --rmdir \
138
- ${remotes_git_svn} ..mybranch5 &&
138
+ remotes/git-svn ..mybranch5 &&
139
139
svn_cmd up "$SVN_TREE" &&
140
140
test -x "$SVN_TREE"/exec.sh'
141
141
@@ -147,7 +147,7 @@ test_expect_success SYMLINKS "$name" '
147
147
git update-index exec.sh &&
148
148
git commit -m "$name" &&
149
149
git svn set-tree --find-copies-harder --rmdir \
150
- ${remotes_git_svn} ..mybranch5 &&
150
+ remotes/git-svn ..mybranch5 &&
151
151
svn_cmd up "$SVN_TREE" &&
152
152
test -h "$SVN_TREE"/exec.sh'
153
153
@@ -159,7 +159,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
159
159
git update-index --add file exec-2.sh &&
160
160
git commit -m "$name" &&
161
161
git svn set-tree --find-copies-harder --rmdir \
162
- ${remotes_git_svn} ..mybranch5 &&
162
+ remotes/git-svn ..mybranch5 &&
163
163
svn_cmd up "$SVN_TREE" &&
164
164
test -x "$SVN_TREE"/file &&
165
165
test -h "$SVN_TREE"/exec-2.sh'
@@ -172,7 +172,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
172
172
git update-index exec-2.sh &&
173
173
git commit -m "$name" &&
174
174
git svn set-tree --find-copies-harder --rmdir \
175
- ${remotes_git_svn} ..mybranch5 &&
175
+ remotes/git-svn ..mybranch5 &&
176
176
svn_cmd up "$SVN_TREE" &&
177
177
test -f "$SVN_TREE"/exec-2.sh &&
178
178
test ! -h "$SVN_TREE"/exec-2.sh &&
@@ -194,7 +194,7 @@ GIT_SVN_ID=alt
194
194
export GIT_SVN_ID
195
195
test_expect_success " $name " \
196
196
' git svn init "$svnrepo" && git svn fetch &&
197
- git rev-list --pretty=raw ${remotes_git_svn} | grep ^tree | uniq > a &&
197
+ git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
198
198
git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
199
199
test_cmp a b'
200
200
@@ -217,17 +217,17 @@ EOF
217
217
218
218
test_expect_success POSIXPERM,SYMLINKS " $name " " test_cmp a expected"
219
219
220
- test_expect_success ' exit if remote refs are ambigious' "
220
+ test_expect_success ' exit if remote refs are ambigious' '
221
221
git config --add svn-remote.svn.fetch \
222
- bar:refs/${remotes_git_svn} &&
222
+ bar:refs/remotes/git-svn &&
223
223
test_must_fail git svn migrate
224
- "
224
+ '
225
225
226
226
test_expect_success ' exit if init-ing a would clobber a URL' '
227
227
svnadmin create "${PWD}/svnrepo2" &&
228
228
svn mkdir -m "mkdir bar" "${svnrepo}2/bar" &&
229
229
git config --unset svn-remote.svn.fetch \
230
- "^bar:refs/${remotes_git_svn} $" &&
230
+ "^bar:refs/remotes/git-svn $" &&
231
231
test_must_fail git svn init "${svnrepo}2/bar"
232
232
'
233
233
@@ -237,7 +237,7 @@ test_expect_success \
237
237
git config --get svn-remote.svn.fetch \
238
238
"^bar:refs/remotes/bar$" &&
239
239
git config --get svn-remote.svn.fetch \
240
- "^:refs/${remotes_git_svn} $"
240
+ "^:refs/remotes/git-svn $"
241
241
'
242
242
243
243
test_expect_success ' dcommit $rev does not clobber current branch' '
@@ -259,26 +259,26 @@ test_expect_success 'dcommit $rev does not clobber current branch' '
259
259
git branch -D my-bar
260
260
'
261
261
262
- test_expect_success ' able to dcommit to a subdirectory' "
262
+ test_expect_success ' able to dcommit to a subdirectory' '
263
263
git svn fetch -i bar &&
264
264
git checkout -b my-bar refs/remotes/bar &&
265
265
echo abc > d &&
266
266
git update-index --add d &&
267
- git commit -m ' /bar/d should be in the log' &&
267
+ git commit -m " /bar/d should be in the log" &&
268
268
git svn dcommit -i bar &&
269
- test -z \"\ $ (git diff refs/heads/my-bar refs/remotes/bar)\ " &&
269
+ test -z " $(git diff refs/heads/my-bar refs/remotes/bar)" &&
270
270
mkdir newdir &&
271
271
echo new > newdir/dir &&
272
272
git update-index --add newdir/dir &&
273
- git commit -m ' add a new directory' &&
273
+ git commit -m " add a new directory" &&
274
274
git svn dcommit -i bar &&
275
- test -z \"\ $ (git diff refs/heads/my-bar refs/remotes/bar)\ " &&
275
+ test -z " $(git diff refs/heads/my-bar refs/remotes/bar)" &&
276
276
echo foo >> newdir/dir &&
277
277
git update-index newdir/dir &&
278
- git commit -m ' modify a file in new directory' &&
278
+ git commit -m " modify a file in new directory" &&
279
279
git svn dcommit -i bar &&
280
- test -z \"\ $ (git diff refs/heads/my-bar refs/remotes/bar)\ "
281
- "
280
+ test -z " $(git diff refs/heads/my-bar refs/remotes/bar)"
281
+ '
282
282
283
283
test_expect_success ' dcommit should not fail with a touched file' '
284
284
test_commit "commit-new-file-foo2" foo2 &&
@@ -291,13 +291,13 @@ test_expect_success 'rebase should not fail with a touched file' '
291
291
git svn rebase
292
292
'
293
293
294
- test_expect_success ' able to set-tree to a subdirectory' "
294
+ test_expect_success ' able to set-tree to a subdirectory' '
295
295
echo cba > d &&
296
296
git update-index d &&
297
- git commit -m ' update /bar/d' &&
297
+ git commit -m " update /bar/d" &&
298
298
git svn set-tree -i bar HEAD &&
299
- test -z \"\ $ (git diff refs/heads/my-bar refs/remotes/bar)\ "
300
- "
299
+ test -z " $(git diff refs/heads/my-bar refs/remotes/bar)"
300
+ '
301
301
302
302
test_expect_success ' git-svn works in a bare repository' '
303
303
mkdir bare-repo &&
0 commit comments