t/lib-git-svn: drop $remote_git_svn and $git_svn_id

These variables were added in 16805d3 (t/t91XX-svn: start removing use of "git-" from these tests, 2008-09-08) so that running: git grep git- would return fewer hits. At the time, we were transitioning away from the use of the "dashed" git-foo form. That transition has been over for years, and grepping for "git-" in the test suite yields thousands of hits anyway (all presumably false positives). With their original purpose gone, these variables serve only to obfuscate the tests. Let's get rid of them. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed May 13, 2016 at 16:47 UTC e1c0c158b13bf78486d6cc2766d6cb69782c5173
11 files changed +60 -63
t/lib-git-svn.sh
-3
@@ -1,8 +1,5 @@
1 . ./test-lib.sh
2
3 -remotes_git_svn=remotes/git""-svn
4 -git_svn_id=git""-svn-id
5 -
3 if test -n "$NO_SVN_TESTS"
4 then
5 skip_all='skipping git svn tests, NO_SVN_TESTS defined'
t/t9100-git-svn-basic.sh
+19 -19
@@ -45,13 +45,13 @@ test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'
45
46 name='try a deep --rmdir with a commit'
47 test_expect_success "$name" '
48 - git checkout -f -b mybranch ${remotes_git_svn} &&
48 + git checkout -f -b mybranch remotes/git-svn &&
49 mv dir/a/b/c/d/e/file dir/file &&
50 cp dir/file file &&
51 git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
52 git commit -m "$name" &&
53 git svn set-tree --find-copies-harder --rmdir \
54 - ${remotes_git_svn}..mybranch &&
54 + remotes/git-svn..mybranch &&
55 svn_cmd up "$SVN_TREE" &&
56 test -d "$SVN_TREE"/dir && test ! -d "$SVN_TREE"/dir/a'
57
@@ -65,14 +65,14 @@ test_expect_success "$name" "
65 git update-index --add dir/file/file &&
66 git commit -m '$name' &&
67 test_must_fail git svn set-tree --find-copies-harder --rmdir \
68 - ${remotes_git_svn}..mybranch
68 + remotes/git-svn..mybranch
69 "
70
71
72 name='detect node change from directory to file #1'
73 test_expect_success "$name" '
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 mv bar/zzz zzz &&
77 rm -rf bar &&
78 mv zzz bar &&
@@ -80,14 +80,14 @@ test_expect_success "$name" '
80 git update-index --add -- bar &&
81 git commit -m "$name" &&
82 test_must_fail git svn set-tree --find-copies-harder --rmdir \
83 - ${remotes_git_svn}..mybranch2
83 + remotes/git-svn..mybranch2
84 '
85
86
87 name='detect node change from file to directory #2'
88 test_expect_success "$name" '
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 rm bar/zzz &&
92 git update-index --remove bar/zzz &&
93 mkdir bar/zzz &&
@@ -95,7 +95,7 @@ test_expect_success "$name" '
95 git update-index --add bar/zzz/yyy &&
96 git commit -m "$name" &&
97 git svn set-tree --find-copies-harder --rmdir \
98 - ${remotes_git_svn}..mybranch3 &&
98 + remotes/git-svn..mybranch3 &&
99 svn_cmd up "$SVN_TREE" &&
100 test -d "$SVN_TREE"/bar/zzz &&
101 test -e "$SVN_TREE"/bar/zzz/yyy
@@ -104,7 +104,7 @@ test_expect_success "$name" '
104 name='detect node change from directory to file #2'
105 test_expect_success "$name" '
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 rm -rf dir &&
109 git update-index --remove -- dir/file &&
110 touch dir &&
@@ -112,19 +112,19 @@ test_expect_success "$name" '
112 git update-index --add -- dir &&
113 git commit -m "$name" &&
114 test_must_fail git svn set-tree --find-copies-harder --rmdir \
115 - ${remotes_git_svn}..mybranch4
115 + remotes/git-svn..mybranch4
116 '
117
118
119 name='remove executable bit from a file'
120 test_expect_success POSIXPERM "$name" '
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 chmod -x exec.sh &&
124 git update-index exec.sh &&
125 git commit -m "$name" &&
126 git svn set-tree --find-copies-harder --rmdir \
127 - ${remotes_git_svn}..mybranch5 &&
127 + remotes/git-svn..mybranch5 &&
128 svn_cmd up "$SVN_TREE" &&
129 test ! -x "$SVN_TREE"/exec.sh'
130
@@ -135,7 +135,7 @@ test_expect_success POSIXPERM "$name" '
135 git update-index exec.sh &&
136 git commit -m "$name" &&
137 git svn set-tree --find-copies-harder --rmdir \
138 - ${remotes_git_svn}..mybranch5 &&
138 + remotes/git-svn..mybranch5 &&
139 svn_cmd up "$SVN_TREE" &&
140 test -x "$SVN_TREE"/exec.sh'
141
@@ -147,7 +147,7 @@ test_expect_success SYMLINKS "$name" '
147 git update-index exec.sh &&
148 git commit -m "$name" &&
149 git svn set-tree --find-copies-harder --rmdir \
150 - ${remotes_git_svn}..mybranch5 &&
150 + remotes/git-svn..mybranch5 &&
151 svn_cmd up "$SVN_TREE" &&
152 test -h "$SVN_TREE"/exec.sh'
153
@@ -159,7 +159,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
159 git update-index --add file exec-2.sh &&
160 git commit -m "$name" &&
161 git svn set-tree --find-copies-harder --rmdir \
162 - ${remotes_git_svn}..mybranch5 &&
162 + remotes/git-svn..mybranch5 &&
163 svn_cmd up "$SVN_TREE" &&
164 test -x "$SVN_TREE"/file &&
165 test -h "$SVN_TREE"/exec-2.sh'
@@ -172,7 +172,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
172 git update-index exec-2.sh &&
173 git commit -m "$name" &&
174 git svn set-tree --find-copies-harder --rmdir \
175 - ${remotes_git_svn}..mybranch5 &&
175 + remotes/git-svn..mybranch5 &&
176 svn_cmd up "$SVN_TREE" &&
177 test -f "$SVN_TREE"/exec-2.sh &&
178 test ! -h "$SVN_TREE"/exec-2.sh &&
@@ -194,7 +194,7 @@ GIT_SVN_ID=alt
194 export GIT_SVN_ID
195 test_expect_success "$name" \
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 git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
199 test_cmp a b'
200
@@ -219,7 +219,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
219
220 test_expect_success 'exit if remote refs are ambigious' "
221 git config --add svn-remote.svn.fetch \
222 - bar:refs/${remotes_git_svn} &&
222 + bar:refs/remotes/git-svn &&
223 test_must_fail git svn migrate
224 "
225
@@ -227,7 +227,7 @@ test_expect_success 'exit if init-ing a would clobber a URL' '
227 svnadmin create "${PWD}/svnrepo2" &&
228 svn mkdir -m "mkdir bar" "${svnrepo}2/bar" &&
229 git config --unset svn-remote.svn.fetch \
230 - "^bar:refs/${remotes_git_svn}$" &&
230 + "^bar:refs/remotes/git-svn$" &&
231 test_must_fail git svn init "${svnrepo}2/bar"
232 '
233
@@ -237,7 +237,7 @@ test_expect_success \
237 git config --get svn-remote.svn.fetch \
238 "^bar:refs/remotes/bar$" &&
239 git config --get svn-remote.svn.fetch \
240 - "^:refs/${remotes_git_svn}$"
240 + "^:refs/remotes/git-svn$"
241 '
242
243 test_expect_success 'dcommit $rev does not clobber current branch' '
t/t9101-git-svn-props.sh
+6 -6
@@ -73,11 +73,11 @@ test_expect_success 'fetch revisions from svn' 'git svn fetch'
73
74 name='test svn:keywords ignoring'
75 test_expect_success "$name" \
76 - 'git checkout -b mybranch ${remotes_git_svn} &&
76 + 'git checkout -b mybranch remotes/git-svn &&
77 echo Hi again >> kw.c &&
78 git commit -a -m "test keywords ignoring" &&
79 - git svn set-tree ${remotes_git_svn}..mybranch &&
80 - git pull . ${remotes_git_svn}'
79 + git svn set-tree remotes/git-svn..mybranch &&
80 + git pull . remotes/git-svn'
81
82 expect='/* $Id$ */'
83 got="$(sed -ne 2p kw.c)"
@@ -95,7 +95,7 @@ test_expect_success "propset CR on crlf files" '
95
96 test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
97 'git svn fetch &&
98 - git pull . ${remotes_git_svn} &&
98 + git pull . remotes/git-svn &&
99 svn_cmd co "$svnrepo" new_wc'
100
101 for i in crlf ne_crlf lf ne_lf cr ne_cr empty_cr empty_lf empty empty_crlf
@@ -117,7 +117,7 @@ cd test_wc
117 svn_cmd commit -m "propset CRLF on cr files"'
118 cd ..
119 test_expect_success 'fetch and pull latest from svn' \
120 - 'git svn fetch && git pull . ${remotes_git_svn}'
120 + 'git svn fetch && git pull . remotes/git-svn'
121
122 b_cr="$(git hash-object cr)"
123 b_ne_cr="$(git hash-object ne_cr)"
@@ -168,7 +168,7 @@ cat >create-ignore-index.expect <<\EOF
168 EOF
169
170 test_expect_success 'test create-ignore' "
171 - git svn fetch && git pull . ${remotes_git_svn} &&
171 + git svn fetch && git pull . remotes/git-svn &&
172 git svn create-ignore &&
173 cmp ./.gitignore create-ignore.expect &&
174 cmp ./deeply/.gitignore create-ignore.expect &&
t/t9102-git-svn-deep-rmdir.sh
+1 -1
@@ -17,7 +17,7 @@ test_expect_success 'initialize repo' '
17 test_expect_success 'mirror via git svn' '
18 git svn init "$svnrepo" &&
19 git svn fetch &&
20 - git checkout -f -b test-rmdir ${remotes_git_svn}
20 + git checkout -f -b test-rmdir remotes/git-svn
21 '
22
23 test_expect_success 'Try a commit on rmdir' '
t/t9106-git-svn-commit-diff-clobber.sh
+3 -3
@@ -44,7 +44,7 @@ test_expect_success 'commit complementing change from git' '
44 test_expect_success 'dcommit fails to commit because of conflict' '
45 git svn init "$svnrepo" &&
46 git svn fetch &&
47 - git reset --hard refs/${remotes_git_svn} &&
47 + git reset --hard refs/remotes/git-svn &&
48 svn_cmd co "$svnrepo" t.svn &&
49 (
50 cd t.svn &&
@@ -59,7 +59,7 @@ test_expect_success 'dcommit fails to commit because of conflict' '
59 '
60
61 test_expect_success 'dcommit does the svn equivalent of an index merge' "
62 - git reset --hard refs/${remotes_git_svn} &&
62 + git reset --hard refs/remotes/git-svn &&
63 echo 'index merge' > file2 &&
64 git update-index --add file2 &&
65 git commit -a -m 'index merge' &&
@@ -81,7 +81,7 @@ test_expect_success 'commit another change from svn side' '
81 '
82
83 test_expect_success 'multiple dcommit from git svn will not clobber svn' "
84 - git reset --hard refs/${remotes_git_svn} &&
84 + git reset --hard refs/remotes/git-svn &&
85 echo new file >> new-file &&
86 git update-index --add new-file &&
87 git commit -a -m 'new file' &&
t/t9107-git-svn-migrate.sh
+7 -7
@@ -19,9 +19,9 @@ test_expect_success 'setup old-looking metadata' '
19 git svn init "$svnrepo" &&
20 git svn fetch &&
21 rm -rf "$GIT_DIR"/svn &&
22 - git update-ref refs/heads/git-svn-HEAD refs/${remotes_git_svn} &&
23 - git update-ref refs/heads/svn-HEAD refs/${remotes_git_svn} &&
24 - git update-ref -d refs/${remotes_git_svn} refs/${remotes_git_svn}
22 + git update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&
23 + git update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&
24 + git update-ref -d refs/remotes/git-svn refs/remotes/git-svn
25 '
26
27 head=$(git rev-parse --verify refs/heads/git-svn-HEAD^0)
@@ -35,11 +35,11 @@ test_expect_success 'initialize old-style (v0) git svn layout' '
35 echo "$svnrepo" > "$GIT_DIR"/svn/info/url &&
36 git svn migrate &&
37 ! test -d "$GIT_DIR"/git-svn &&
38 - git rev-parse --verify refs/${remotes_git_svn}^0 &&
38 + git rev-parse --verify refs/remotes/git-svn^0 &&
39 git rev-parse --verify refs/remotes/svn^0 &&
40 test "$(git config --get svn-remote.svn.url)" = "$svnrepo_escaped" &&
41 test $(git config --get svn-remote.svn.fetch) = \
42 - ":refs/${remotes_git_svn}"
42 + ":refs/remotes/git-svn"
43 '
44
45 test_expect_success 'initialize a multi-repository repo' '
@@ -66,7 +66,7 @@ test_expect_success 'initialize a multi-repository repo' '
66 grep "^tags/0\.1:refs/remotes/origin/tags/0\.1$" fetch.out &&
67 grep "^tags/0\.2:refs/remotes/origin/tags/0\.2$" fetch.out &&
68 grep "^tags/0\.3:refs/remotes/origin/tags/0\.3$" fetch.out &&
69 - grep "^:refs/${remotes_git_svn}" fetch.out
69 + grep "^:refs/remotes/git-svn" fetch.out
70 '
71
72 # refs should all be different, but the trees should all be the same:
@@ -104,7 +104,7 @@ test_expect_success 'migrate --minimize on old inited layout' '
104 grep "^tags/0\.1:refs/remotes/origin/tags/0\.1$" fetch.out &&
105 grep "^tags/0\.2:refs/remotes/origin/tags/0\.2$" fetch.out &&
106 grep "^tags/0\.3:refs/remotes/origin/tags/0\.3$" fetch.out &&
107 - grep "^:refs/${remotes_git_svn}" fetch.out
107 + grep "^:refs/remotes/git-svn" fetch.out
108 '
109
110 test_expect_success ".rev_db auto-converted to .rev_map.UUID" '
t/t9110-git-svn-use-svm-props.sh
+9 -9
@@ -22,31 +22,31 @@ uuid=161ce429-a9dd-4828-af4a-52023f968c89
22 bar_url=http://mayonaise/svnrepo/bar
23 test_expect_success 'verify metadata for /bar' "
24 git cat-file commit refs/remotes/bar | \
25 - grep '^${git_svn_id}: $bar_url@12 $uuid$' &&
25 + grep '^git-svn-id: $bar_url@12 $uuid$' &&
26 git cat-file commit refs/remotes/bar~1 | \
27 - grep '^${git_svn_id}: $bar_url@11 $uuid$' &&
27 + grep '^git-svn-id: $bar_url@11 $uuid$' &&
28 git cat-file commit refs/remotes/bar~2 | \
29 - grep '^${git_svn_id}: $bar_url@10 $uuid$' &&
29 + grep '^git-svn-id: $bar_url@10 $uuid$' &&
30 git cat-file commit refs/remotes/bar~3 | \
31 - grep '^${git_svn_id}: $bar_url@9 $uuid$' &&
31 + grep '^git-svn-id: $bar_url@9 $uuid$' &&
32 git cat-file commit refs/remotes/bar~4 | \
33 - grep '^${git_svn_id}: $bar_url@6 $uuid$' &&
33 + grep '^git-svn-id: $bar_url@6 $uuid$' &&
34 git cat-file commit refs/remotes/bar~5 | \
35 - grep '^${git_svn_id}: $bar_url@1 $uuid$'
35 + grep '^git-svn-id: $bar_url@1 $uuid$'
36 "
37
38 e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
39 test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
40 git cat-file commit refs/remotes/e | \
41 - grep '^${git_svn_id}: $e_url@1 $uuid$'
41 + grep '^git-svn-id: $e_url@1 $uuid$'
42 "
43
44 dir_url=http://mayonaise/svnrepo/dir
45 test_expect_success 'verify metadata for /dir' "
46 git cat-file commit refs/remotes/dir | \
47 - grep '^${git_svn_id}: $dir_url@2 $uuid$' &&
47 + grep '^git-svn-id: $dir_url@2 $uuid$' &&
48 git cat-file commit refs/remotes/dir~1 | \
49 - grep '^${git_svn_id}: $dir_url@1 $uuid$'
49 + grep '^git-svn-id: $dir_url@1 $uuid$'
50 "
51
52 test_expect_success 'find commit based on SVN revision number' "
t/t9111-git-svn-use-svnsync-props.sh
+9 -9
@@ -21,31 +21,31 @@ uuid=161ce429-a9dd-4828-af4a-52023f968c89
21 bar_url=http://mayonaise/svnrepo/bar
22 test_expect_success 'verify metadata for /bar' "
23 git cat-file commit refs/remotes/bar | \
24 - grep '^${git_svn_id}: $bar_url@12 $uuid$' &&
24 + grep '^git-svn-id: $bar_url@12 $uuid$' &&
25 git cat-file commit refs/remotes/bar~1 | \
26 - grep '^${git_svn_id}: $bar_url@11 $uuid$' &&
26 + grep '^git-svn-id: $bar_url@11 $uuid$' &&
27 git cat-file commit refs/remotes/bar~2 | \
28 - grep '^${git_svn_id}: $bar_url@10 $uuid$' &&
28 + grep '^git-svn-id: $bar_url@10 $uuid$' &&
29 git cat-file commit refs/remotes/bar~3 | \
30 - grep '^${git_svn_id}: $bar_url@9 $uuid$' &&
30 + grep '^git-svn-id: $bar_url@9 $uuid$' &&
31 git cat-file commit refs/remotes/bar~4 | \
32 - grep '^${git_svn_id}: $bar_url@6 $uuid$' &&
32 + grep '^git-svn-id: $bar_url@6 $uuid$' &&
33 git cat-file commit refs/remotes/bar~5 | \
34 - grep '^${git_svn_id}: $bar_url@1 $uuid$'
34 + grep '^git-svn-id: $bar_url@1 $uuid$'
35 "
36
37 e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
38 test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
39 git cat-file commit refs/remotes/e | \
40 - grep '^${git_svn_id}: $e_url@1 $uuid$'
40 + grep '^git-svn-id: $e_url@1 $uuid$'
41 "
42
43 dir_url=http://mayonaise/svnrepo/dir
44 test_expect_success 'verify metadata for /dir' "
45 git cat-file commit refs/remotes/dir | \
46 - grep '^${git_svn_id}: $dir_url@2 $uuid$' &&
46 + grep '^git-svn-id: $dir_url@2 $uuid$' &&
47 git cat-file commit refs/remotes/dir~1 | \
48 - grep '^${git_svn_id}: $dir_url@1 $uuid$'
48 + grep '^git-svn-id: $dir_url@1 $uuid$'
49 "
50
51 test_done
t/t9120-git-svn-clone-with-percent-escapes.sh
+3 -3
@@ -22,7 +22,7 @@ test_expect_success 'test clone with percent escapes' '
22 git svn clone "$svnrepo/pr%20ject" clone &&
23 (
24 cd clone &&
25 - git rev-parse refs/${remotes_git_svn}
25 + git rev-parse refs/remotes/git-svn
26 )
27 '
28
@@ -42,7 +42,7 @@ test_expect_success 'test clone trunk with percent escapes and minimize-url' '
42 git svn clone --minimize-url "$svnrepo/pr%20ject/trunk" minimize &&
43 (
44 cd minimize &&
45 - git rev-parse refs/${remotes_git_svn}
45 + git rev-parse refs/remotes/git-svn
46 )
47 '
48
@@ -50,7 +50,7 @@ test_expect_success 'test clone trunk with percent escapes' '
50 git svn clone "$svnrepo/pr%20ject/trunk" trunk &&
51 (
52 cd trunk &&
53 - git rev-parse refs/${remotes_git_svn}
53 + git rev-parse refs/remotes/git-svn
54 )
55 '
56
t/t9123-git-svn-rebuild-with-rewriteroot.sh
+1 -1
@@ -17,7 +17,7 @@ rm -rf import
17 test_expect_success 'init, fetch and checkout repository' '
18 git svn init --rewrite-root=http://invalid.invalid/ "$svnrepo" &&
19 git svn fetch &&
20 - git checkout -b mybranch ${remotes_git_svn}
20 + git checkout -b mybranch remotes/git-svn
21 '
22
23 test_expect_success 'remove rev_map' '
t/t9153-git-svn-rewrite-uuid.sh
+2 -2
@@ -17,9 +17,9 @@ test_expect_success 'load svn repo' "
17
18 test_expect_success 'verify uuid' "
19 git cat-file commit refs/remotes/git-svn~0 | \
20 - grep '^${git_svn_id}: .*@2 $uuid$' &&
20 + grep '^git-svn-id: .*@2 $uuid$' &&
21 git cat-file commit refs/remotes/git-svn~1 | \
22 - grep '^${git_svn_id}: .*@1 $uuid$'
22 + grep '^git-svn-id: .*@1 $uuid$'
23 "
24
25 test_done