contrib/subtree: remove test number comments

Delete the comments indicating test numbers as it causes maintenance headaches. t*.sh -i will help us find any broken tests and these numbers are not helping us anyway. Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

David A. Greene committed Feb 4, 2013 at 22:06 UTC 144797d7209565f1d377aaf1f157ea30eff5e04c
1 file changed -55
contrib/subtree/t/t7900-subtree.sh
-55
@@ -60,7 +60,6 @@ last_commit_message()
60 git log --pretty=format:%s -1
61 }
62
63 -# 1
63 test_expect_success 'init subproj' '
64 test_create_repo subproj
65 '
@@ -68,7 +67,6 @@ test_expect_success 'init subproj' '
67 # To the subproject!
68 cd subproj
69
71 -# 2
70 test_expect_success 'add sub1' '
71 create sub1 &&
72 git commit -m "sub1" &&
@@ -76,14 +74,12 @@ test_expect_success 'add sub1' '
74 git branch -m master subproj
75 '
76
79 -# 3
77 test_expect_success 'add sub2' '
78 create sub2 &&
79 git commit -m "sub2" &&
80 git branch sub2
81 '
82
86 -# 4
83 test_expect_success 'add sub3' '
84 create sub3 &&
85 git commit -m "sub3" &&
@@ -93,7 +89,6 @@ test_expect_success 'add sub3' '
89 # Back to mainline
90 cd ..
91
96 -# 5
92 test_expect_success 'add main4' '
93 create main4 &&
94 git commit -m "main4" &&
@@ -101,101 +96,85 @@ test_expect_success 'add main4' '
96 git branch subdir
97 '
98
104 -# 6
99 test_expect_success 'fetch subproj history' '
100 git fetch ./subproj sub1 &&
101 git branch sub1 FETCH_HEAD
102 '
103
110 -# 7
104 test_expect_success 'no subtree exists in main tree' '
105 test_must_fail git subtree merge --prefix=subdir sub1
106 '
107
115 -# 8
108 test_expect_success 'no pull from non-existant subtree' '
109 test_must_fail git subtree pull --prefix=subdir ./subproj sub1
110 '
111
120 -# 9
112 test_expect_success 'check if --message works for add' '
113 git subtree add --prefix=subdir --message="Added subproject" sub1 &&
114 check_equal ''"$(last_commit_message)"'' "Added subproject" &&
115 undo
116 '
117
127 -# 10
118 test_expect_success 'check if --message works as -m and --prefix as -P' '
119 git subtree add -P subdir -m "Added subproject using git subtree" sub1 &&
120 check_equal ''"$(last_commit_message)"'' "Added subproject using git subtree" &&
121 undo
122 '
123
134 -# 11
124 test_expect_success 'check if --message works with squash too' '
125 git subtree add -P subdir -m "Added subproject with squash" --squash sub1 &&
126 check_equal ''"$(last_commit_message)"'' "Added subproject with squash" &&
127 undo
128 '
129
141 -# 12
130 test_expect_success 'add subproj to mainline' '
131 git subtree add --prefix=subdir/ FETCH_HEAD &&
132 check_equal ''"$(last_commit_message)"'' "Add '"'subdir/'"' from commit '"'"'''"$(git rev-parse sub1)"'''"'"'"
133 '
134
147 -# 13
135 # this shouldn't actually do anything, since FETCH_HEAD is already a parent
136 test_expect_success 'merge fetched subproj' '
137 git merge -m "merge -s -ours" -s ours FETCH_HEAD
138 '
139
153 -# 14
140 test_expect_success 'add main-sub5' '
141 create subdir/main-sub5 &&
142 git commit -m "main-sub5"
143 '
144
159 -# 15
145 test_expect_success 'add main6' '
146 create main6 &&
147 git commit -m "main6 boring"
148 '
149
165 -# 16
150 test_expect_success 'add main-sub7' '
151 create subdir/main-sub7 &&
152 git commit -m "main-sub7"
153 '
154
171 -# 17
155 test_expect_success 'fetch new subproj history' '
156 git fetch ./subproj sub2 &&
157 git branch sub2 FETCH_HEAD
158 '
159
177 -# 18
160 test_expect_success 'check if --message works for merge' '
161 git subtree merge --prefix=subdir -m "Merged changes from subproject" sub2 &&
162 check_equal ''"$(last_commit_message)"'' "Merged changes from subproject" &&
163 undo
164 '
165
184 -# 19
166 test_expect_success 'check if --message for merge works with squash too' '
167 git subtree merge --prefix subdir -m "Merged changes from subproject using squash" --squash sub2 &&
168 check_equal ''"$(last_commit_message)"'' "Merged changes from subproject using squash" &&
169 undo
170 '
171
191 -# 20
172 test_expect_success 'merge new subproj history into subdir' '
173 git subtree merge --prefix=subdir FETCH_HEAD &&
174 git branch pre-split &&
175 check_equal ''"$(last_commit_message)"'' "Merge commit '"'"'"$(git rev-parse sub2)"'"'"' into mainline"
176 '
177
198 -# 21
178 test_expect_success 'Check that prefix argument is required for split' '
179 echo "You must provide the --prefix option." > expected &&
180 test_must_fail git subtree split > actual 2>&1 &&
@@ -207,7 +186,6 @@ test_expect_success 'Check that prefix argument is required for split' '
186 rm -f expected actual
187 '
188
210 -# 22
189 test_expect_success 'Check that the <prefix> exists for a split' '
190 echo "'"'"'non-existent-directory'"'"'" does not exist\; use "'"'"'git subtree add'"'"'" > expected &&
191 test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
@@ -219,7 +197,6 @@ test_expect_success 'Check that the <prefix> exists for a split' '
197 # rm -f expected actual
198 '
199
222 -# 23
200 test_expect_success 'check if --message works for split+rejoin' '
201 spl1=''"$(git subtree split --annotate='"'*'"' --prefix subdir --onto FETCH_HEAD --message "Split & rejoin" --rejoin)"'' &&
202 git branch spl1 "$spl1" &&
@@ -227,7 +204,6 @@ test_expect_success 'check if --message works for split+rejoin' '
204 undo
205 '
206
230 -# 24
207 test_expect_success 'check split with --branch' '
208 spl1=$(git subtree split --annotate='"'*'"' --prefix subdir --onto FETCH_HEAD --message "Split & rejoin" --rejoin) &&
209 undo &&
@@ -235,7 +211,6 @@ test_expect_success 'check split with --branch' '
211 check_equal ''"$(git rev-parse splitbr1)"'' "$spl1"
212 '
213
238 -# 25
214 test_expect_success 'check split with --branch for an existing branch' '
215 spl1=''"$(git subtree split --annotate='"'*'"' --prefix subdir --onto FETCH_HEAD --message "Split & rejoin" --rejoin)"'' &&
216 undo &&
@@ -244,13 +219,10 @@ test_expect_success 'check split with --branch for an existing branch' '
219 check_equal ''"$(git rev-parse splitbr2)"'' "$spl1"
220 '
221
247 -# 26
222 test_expect_success 'check split with --branch for an incompatible branch' '
223 test_must_fail git subtree split --prefix subdir --onto FETCH_HEAD --branch subdir
224 '
225
252 -
253 -# 27
226 test_expect_success 'check split+rejoin' '
227 spl1=''"$(git subtree split --annotate='"'*'"' --prefix subdir --onto FETCH_HEAD --message "Split & rejoin" --rejoin)"'' &&
228 undo &&
@@ -258,7 +230,6 @@ test_expect_success 'check split+rejoin' '
230 check_equal ''"$(last_commit_message)"'' "Split '"'"'subdir/'"'"' into commit '"'"'"$spl1"'"'"'"
231 '
232
261 -# 28
233 test_expect_success 'add main-sub8' '
234 create subdir/main-sub8 &&
235 git commit -m "main-sub8"
@@ -267,14 +238,12 @@ test_expect_success 'add main-sub8' '
238 # To the subproject!
239 cd ./subproj
240
270 -# 29
241 test_expect_success 'merge split into subproj' '
242 git fetch .. spl1 &&
243 git branch spl1 FETCH_HEAD &&
244 git merge FETCH_HEAD
245 '
246
277 -# 30
247 test_expect_success 'add sub9' '
248 create sub9 &&
249 git commit -m "sub9"
@@ -283,19 +252,16 @@ test_expect_success 'add sub9' '
252 # Back to mainline
253 cd ..
254
286 -# 31
255 test_expect_success 'split for sub8' '
256 split2=''"$(git subtree split --annotate='"'*'"' --prefix subdir/ --rejoin)"''
257 git branch split2 "$split2"
258 '
259
292 -# 32
260 test_expect_success 'add main-sub10' '
261 create subdir/main-sub10 &&
262 git commit -m "main-sub10"
263 '
264
298 -# 33
265 test_expect_success 'split for sub10' '
266 spl3=''"$(git subtree split --annotate='"'*'"' --prefix subdir --rejoin)"'' &&
267 git branch spl3 "$spl3"
@@ -304,7 +270,6 @@ test_expect_success 'split for sub10' '
270 # To the subproject!
271 cd ./subproj
272
307 -# 34
273 test_expect_success 'merge split into subproj' '
274 git fetch .. spl3 &&
275 git branch spl3 FETCH_HEAD &&
@@ -318,13 +283,11 @@ chkms_sub=$(echo $chkms | multiline | sed 's,^,subdir/,' | fixnl)
283 chks="sub1 sub2 sub3 sub9"
284 chks_sub=$(echo $chks | multiline | sed 's,^,subdir/,' | fixnl)
285
321 -# 35
286 test_expect_success 'make sure exactly the right set of files ends up in the subproj' '
287 subfiles=''"$(git ls-files | fixnl)"'' &&
288 check_equal "$subfiles" "$chkms $chks"
289 '
290
327 -# 36
291 test_expect_success 'make sure the subproj history *only* contains commits that affect the subdir' '
292 allchanges=''"$(git log --name-only --pretty=format:'"''"' | sort | fixnl)"'' &&
293 check_equal "$allchanges" "$chkms $chks"
@@ -333,20 +296,17 @@ test_expect_success 'make sure the subproj history *only* contains commits that
296 # Back to mainline
297 cd ..
298
336 -# 37
299 test_expect_success 'pull from subproj' '
300 git fetch ./subproj subproj-merge-spl3 &&
301 git branch subproj-merge-spl3 FETCH_HEAD &&
302 git subtree pull --prefix=subdir ./subproj subproj-merge-spl3
303 '
304
343 -# 38
305 test_expect_success 'make sure exactly the right set of files ends up in the mainline' '
306 mainfiles=''"$(git ls-files | fixnl)"'' &&
307 check_equal "$mainfiles" "$chkm $chkms_sub $chks_sub"
308 '
309
349 -# 39
310 test_expect_success 'make sure each filename changed exactly once in the entire history' '
311 # main-sub?? and /subdir/main-sub?? both change, because those are the
312 # changes that were split into their own history. And subdir/sub?? never
@@ -355,12 +315,10 @@ test_expect_success 'make sure each filename changed exactly once in the entire
315 check_equal "$allchanges" ''"$(echo $chkms $chkm $chks $chkms_sub | multiline | sort | fixnl)"''
316 '
317
358 -# 40
318 test_expect_success 'make sure the --rejoin commits never make it into subproj' '
319 check_equal ''"$(git log --pretty=format:'"'%s'"' HEAD^2 | grep -i split)"'' ""
320 '
321
363 -# 41
322 test_expect_success 'make sure no "git subtree" tagged commits make it into subproj' '
323 # They are meaningless to subproj since one side of the merge refers to the mainline
324 check_equal ''"$(git log --pretty=format:'"'%s%n%b'"' HEAD^2 | grep "git-subtree.*:")"'' ""
@@ -370,14 +328,12 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp
328 mkdir test2
329 cd test2
330
373 -# 42
331 test_expect_success 'init main' '
332 test_create_repo main
333 '
334
335 cd main
336
380 -# 43
337 test_expect_success 'add main1' '
338 create main1 &&
339 git commit -m "main1"
@@ -385,14 +341,12 @@ test_expect_success 'add main1' '
341
342 cd ..
343
388 -# 44
344 test_expect_success 'init sub' '
345 test_create_repo sub
346 '
347
348 cd sub
349
395 -# 45
350 test_expect_success 'add sub2' '
351 create sub2 &&
352 git commit -m "sub2"
@@ -402,7 +356,6 @@ cd ../main
356
357 # check if split can find proper base without --onto
358
405 -# 46
359 test_expect_success 'add sub as subdir in main' '
360 git fetch ../sub master &&
361 git branch sub2 FETCH_HEAD &&
@@ -411,7 +364,6 @@ test_expect_success 'add sub as subdir in main' '
364
365 cd ../sub
366
414 -# 47
367 test_expect_success 'add sub3' '
368 create sub3 &&
369 git commit -m "sub3"
@@ -419,20 +371,17 @@ test_expect_success 'add sub3' '
371
372 cd ../main
373
422 -# 48
374 test_expect_success 'merge from sub' '
375 git fetch ../sub master &&
376 git branch sub3 FETCH_HEAD &&
377 git subtree merge --prefix subdir sub3
378 '
379
429 -# 49
380 test_expect_success 'add main-sub4' '
381 create subdir/main-sub4 &&
382 git commit -m "main-sub4"
383 '
384
435 -# 50
385 test_expect_success 'split for main-sub4 without --onto' '
386 git subtree split --prefix subdir --branch mainsub4
387 '
@@ -442,19 +391,16 @@ test_expect_success 'split for main-sub4 without --onto' '
391 # have been sub3, but it was not, because its cache was not set to
392 # itself)
393
445 -# 51
394 test_expect_success 'check that the commit parent is sub3' '
395 check_equal ''"$(git log --pretty=format:%P -1 mainsub4)"'' ''"$(git rev-parse sub3)"''
396 '
397
450 -# 52
398 test_expect_success 'add main-sub5' '
399 mkdir subdir2 &&
400 create subdir2/main-sub5 &&
401 git commit -m "main-sub5"
402 '
403
457 -# 53
404 test_expect_success 'split for main-sub5 without --onto' '
405 # also test that we still can split out an entirely new subtree
406 # if the parent of the first commit in the tree is not empty,
@@ -487,7 +433,6 @@ joincommits()
433 echo "$commit $all"
434 }
435
490 -# 54
436 test_expect_success 'verify one file change per commit' '
437 x= &&
438 list=''"$(git log --pretty=format:'"'commit: %H'"' | joincommits)"'' &&