Blob


1 #!/bin/sh
2 #
3 # Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
4 #
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 . ./common.sh
19 test_clone_basic() {
20 local testroot=`test_init clone_basic`
21 local testurl=ssh://127.0.0.1/$testroot
22 local commit_id=`git_show_head $testroot/repo`
24 got clone -q $testurl/repo $testroot/repo-clone
25 ret="$?"
26 if [ "$ret" != "0" ]; then
27 echo "got clone command failed unexpectedly" >&2
28 test_done "$testroot" "$ret"
29 return 1
30 fi
32 got log -l0 -p -r $testroot/repo > $testroot/log-repo
33 if [ "$ret" != "0" ]; then
34 echo "got log command failed unexpectedly" >&2
35 test_done "$testroot" "$ret"
36 return 1
37 fi
38 got log -l0 -p -r $testroot/repo > $testroot/log-repo-clone
39 if [ "$ret" != "0" ]; then
40 echo "got log command failed unexpectedly" >&2
41 test_done "$testroot" "$ret"
42 return 1
43 fi
44 cmp -s $testroot/log-repo $testroot/log-repo-clone
45 ret="$?"
46 if [ "$ret" != "0" ]; then
47 echo "log -p output of cloned repository differs" >&2
48 test_done "$testroot" "$ret"
49 return 1
50 fi
52 got ref -l -r $testroot/repo > $testroot/stdout
53 if [ "$ret" != "0" ]; then
54 echo "got ref command failed unexpectedly" >&2
55 test_done "$testroot" "$ret"
56 return 1
57 fi
59 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
60 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
62 cmp -s $testroot/stdout $testroot/stdout.expected
63 ret="$?"
64 if [ "$ret" != "0" ]; then
65 diff -u $testroot/stdout.expected $testroot/stdout
66 test_done "$testroot" "$ret"
67 return 1
68 fi
70 got ref -l -r $testroot/repo-clone > $testroot/stdout
71 if [ "$ret" != "0" ]; then
72 echo "got ref command failed unexpectedly" >&2
73 test_done "$testroot" "$ret"
74 return 1
75 fi
77 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
78 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
79 echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
80 >> $testroot/stdout.expected
81 echo "refs/remotes/origin/master: $commit_id" \
82 >> $testroot/stdout.expected
84 cmp -s $testroot/stdout $testroot/stdout.expected
85 ret="$?"
86 if [ "$ret" != "0" ]; then
87 diff -u $testroot/stdout.expected $testroot/stdout
88 test_done "$testroot" "$ret"
89 return 1
90 fi
92 cat > $testroot/got.conf.expected <<EOF
93 remote "origin" {
94 server 127.0.0.1
95 protocol ssh
96 repository "$testroot/repo"
97 }
98 EOF
99 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
100 ret="$?"
101 if [ "$ret" != "0" ]; then
102 diff -u $testroot/got.conf.expected \
103 $testroot/repo-clone/got.conf
104 test_done "$testroot" "$ret"
105 return 1
106 fi
108 cat > $testroot/config.expected <<EOF
109 [core]
110 repositoryformatversion = 0
111 filemode = true
112 bare = true
114 [remote "origin"]
115 url = ssh://127.0.0.1$testroot/repo
116 fetch = +refs/heads/master:refs/remotes/origin/master
117 EOF
118 cmp -s $testroot/repo-clone/config $testroot/config.expected
119 ret="$?"
120 if [ "$ret" != "0" ]; then
121 diff -u $testroot/config.expected \
122 $testroot/repo-clone/config
123 fi
124 test_done "$testroot" "$ret"
127 test_clone_list() {
128 local testroot=`test_init clone_list`
129 local testurl=ssh://127.0.0.1/$testroot
130 local commit_id=`git_show_head $testroot/repo`
132 got branch -r $testroot/repo -c $commit_id foo
133 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
134 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
136 got clone -l $testurl/repo > $testroot/stdout 2>$testroot/stderr
137 ret="$?"
138 if [ "$ret" != "0" ]; then
139 echo "got clone command failed unexpectedly" >&2
140 test_done "$testroot" "$ret"
141 return 1
142 fi
144 echo "Connecting to 127.0.0.1" > $testroot/stdout.expected
145 got ref -l -r $testroot/repo >> $testroot/stdout.expected
147 cmp -s $testroot/stdout $testroot/stdout.expected
148 ret="$?"
149 if [ "$ret" != "0" ]; then
150 diff -u $testroot/stdout.expected $testroot/stdout
151 fi
152 test_done "$testroot" "$ret"
155 test_clone_branch() {
156 local testroot=`test_init clone_branch`
157 local testurl=ssh://127.0.0.1/$testroot
158 local commit_id=`git_show_head $testroot/repo`
160 got branch -r $testroot/repo -c $commit_id foo
161 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
162 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
163 local tag_id=`got ref -r $testroot/repo -l \
164 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
166 got clone -q -b foo $testurl/repo $testroot/repo-clone
167 ret="$?"
168 if [ "$ret" != "0" ]; then
169 echo "got clone command failed unexpectedly" >&2
170 test_done "$testroot" "$ret"
171 return 1
172 fi
174 got ref -l -r $testroot/repo-clone > $testroot/stdout
176 echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
177 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
178 # refs/heads/master is missing because it wasn't passed via -b
179 echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
180 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
181 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
183 cmp -s $testroot/stdout $testroot/stdout.expected
184 ret="$?"
185 if [ "$ret" != "0" ]; then
186 diff -u $testroot/stdout.expected $testroot/stdout
187 test_done "$testroot" "$ret"
188 return 1
189 fi
191 cat > $testroot/got.conf.expected <<EOF
192 remote "origin" {
193 server 127.0.0.1
194 protocol ssh
195 repository "$testroot/repo"
197 EOF
198 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
199 ret="$?"
200 if [ "$ret" != "0" ]; then
201 diff -u $testroot/got.conf.expected \
202 $testroot/repo-clone/got.conf
203 test_done "$testroot" "$ret"
204 return 1
205 fi
207 cat > $testroot/config.expected <<EOF
208 [core]
209 repositoryformatversion = 0
210 filemode = true
211 bare = true
213 [remote "origin"]
214 url = ssh://127.0.0.1$testroot/repo
215 fetch = +refs/heads/foo:refs/remotes/origin/foo
216 EOF
217 cmp -s $testroot/repo-clone/config $testroot/config.expected
218 ret="$?"
219 if [ "$ret" != "0" ]; then
220 diff -u $testroot/config.expected \
221 $testroot/repo-clone/config
222 fi
223 test_done "$testroot" "$ret"
226 test_clone_all() {
227 local testroot=`test_init clone_all`
228 local testurl=ssh://127.0.0.1/$testroot
229 local commit_id=`git_show_head $testroot/repo`
231 got branch -r $testroot/repo -c $commit_id foo
232 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
233 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
234 local tag_id=`got ref -r $testroot/repo -l \
235 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
237 got clone -q -a $testurl/repo $testroot/repo-clone
238 ret="$?"
239 if [ "$ret" != "0" ]; then
240 echo "got clone command failed unexpectedly" >&2
241 test_done "$testroot" "$ret"
242 return 1
243 fi
245 got ref -l -r $testroot/repo-clone > $testroot/stdout
247 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
248 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
249 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
250 echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
251 >> $testroot/stdout.expected
252 echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
253 echo "refs/remotes/origin/master: $commit_id" \
254 >> $testroot/stdout.expected
255 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
256 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
258 cmp -s $testroot/stdout $testroot/stdout.expected
259 ret="$?"
260 if [ "$ret" != "0" ]; then
261 diff -u $testroot/stdout.expected $testroot/stdout
262 test_done "$testroot" "$ret"
263 return 1
264 fi
266 cat > $testroot/got.conf.expected <<EOF
267 remote "origin" {
268 server 127.0.0.1
269 protocol ssh
270 repository "$testroot/repo"
272 EOF
273 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
274 ret="$?"
275 if [ "$ret" != "0" ]; then
276 diff -u $testroot/got.conf.expected \
277 $testroot/repo-clone/got.conf
278 test_done "$testroot" "$ret"
279 return 1
280 fi
282 cat > $testroot/config.expected <<EOF
283 [core]
284 repositoryformatversion = 0
285 filemode = true
286 bare = true
288 [remote "origin"]
289 url = ssh://127.0.0.1$testroot/repo
290 fetch = +refs/heads/*:refs/remotes/origin/*
291 EOF
292 cmp -s $testroot/repo-clone/config $testroot/config.expected
293 ret="$?"
294 if [ "$ret" != "0" ]; then
295 diff -u $testroot/config.expected \
296 $testroot/repo-clone/config
297 fi
298 test_done "$testroot" "$ret"
301 test_clone_mirror() {
302 local testroot=`test_init clone_mirror`
303 local testurl=ssh://127.0.0.1/$testroot
304 local commit_id=`git_show_head $testroot/repo`
306 got branch -r $testroot/repo -c $commit_id foo
307 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
308 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
309 local tag_id=`got ref -r $testroot/repo -l \
310 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
312 got clone -q -m $testurl/repo $testroot/repo-clone
313 ret="$?"
314 if [ "$ret" != "0" ]; then
315 echo "got clone command failed unexpectedly" >&2
316 test_done "$testroot" "$ret"
317 return 1
318 fi
320 got ref -l -r $testroot/repo-clone > $testroot/stdout
322 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
323 # refs/heads/foo is missing because we're not fetching all branches
324 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
325 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
326 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
328 cmp -s $testroot/stdout $testroot/stdout.expected
329 ret="$?"
330 if [ "$ret" != "0" ]; then
331 diff -u $testroot/stdout.expected $testroot/stdout
332 test_done "$testroot" "$ret"
333 return 1
334 fi
336 cat > $testroot/got.conf.expected <<EOF
337 remote "origin" {
338 server 127.0.0.1
339 protocol ssh
340 repository "$testroot/repo"
341 mirror-references yes
343 EOF
344 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
345 ret="$?"
346 if [ "$ret" != "0" ]; then
347 diff -u $testroot/got.conf.expected \
348 $testroot/repo-clone/got.conf
349 test_done "$testroot" "$ret"
350 return 1
351 fi
353 cat > $testroot/config.expected <<EOF
354 [core]
355 repositoryformatversion = 0
356 filemode = true
357 bare = true
359 [remote "origin"]
360 url = ssh://127.0.0.1$testroot/repo
361 fetch = +refs/*:refs/*
362 mirror = true
363 EOF
364 cmp -s $testroot/repo-clone/config $testroot/config.expected
365 ret="$?"
366 if [ "$ret" != "0" ]; then
367 diff -u $testroot/config.expected \
368 $testroot/repo-clone/config
369 fi
370 test_done "$testroot" "$ret"
373 test_clone_mirror_all() {
374 local testroot=`test_init clone_mirror_all`
375 local testurl=ssh://127.0.0.1/$testroot
376 local commit_id=`git_show_head $testroot/repo`
378 got branch -r $testroot/repo -c $commit_id foo
379 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
380 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
381 local tag_id=`got ref -r $testroot/repo -l \
382 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
384 got clone -q -m -a $testurl/repo $testroot/repo-clone
385 ret="$?"
386 if [ "$ret" != "0" ]; then
387 echo "got clone command failed unexpectedly" >&2
388 test_done "$testroot" "$ret"
389 return 1
390 fi
392 got ref -l -r $testroot/repo-clone > $testroot/stdout
394 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
395 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
396 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
397 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
398 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
400 cmp -s $testroot/stdout $testroot/stdout.expected
401 ret="$?"
402 if [ "$ret" != "0" ]; then
403 diff -u $testroot/stdout.expected $testroot/stdout
404 test_done "$testroot" "$ret"
405 return 1
406 fi
408 cat > $testroot/got.conf.expected <<EOF
409 remote "origin" {
410 server 127.0.0.1
411 protocol ssh
412 repository "$testroot/repo"
413 mirror-references yes
415 EOF
416 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
417 ret="$?"
418 if [ "$ret" != "0" ]; then
419 diff -u $testroot/got.conf.expected \
420 $testroot/repo-clone/got.conf
421 test_done "$testroot" "$ret"
422 return 1
423 fi
425 cat > $testroot/config.expected <<EOF
426 [core]
427 repositoryformatversion = 0
428 filemode = true
429 bare = true
431 [remote "origin"]
432 url = ssh://127.0.0.1$testroot/repo
433 fetch = +refs/*:refs/*
434 mirror = true
435 EOF
436 cmp -s $testroot/repo-clone/config $testroot/config.expected
437 ret="$?"
438 if [ "$ret" != "0" ]; then
439 diff -u $testroot/config.expected \
440 $testroot/repo-clone/config
441 fi
442 test_done "$testroot" "$ret"
445 test_clone_reference() {
446 local testroot=`test_init clone_reference`
447 local testurl=ssh://127.0.0.1/$testroot
448 local commit_id=`git_show_head $testroot/repo`
450 got branch -r $testroot/repo -c $commit_id foo
451 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
452 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
453 local tag_id=`got ref -r $testroot/repo -l \
454 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
456 got clone -q -R hoo $testurl/repo $testroot/repo-clone
457 ret="$?"
458 if [ "$ret" != "0" ]; then
459 echo "got clone command failed unexpectedly" >&2
460 test_done "$testroot" "$ret"
461 return 1
462 fi
464 got ref -l -r $testroot/repo-clone > $testroot/stdout
466 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
467 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
468 echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
469 >> $testroot/stdout.expected
470 echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
471 >> $testroot/stdout.expected
472 echo "refs/remotes/origin/master: $commit_id" \
473 >> $testroot/stdout.expected
474 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
476 cmp -s $testroot/stdout $testroot/stdout.expected
477 ret="$?"
478 if [ "$ret" != "0" ]; then
479 diff -u $testroot/stdout.expected $testroot/stdout
480 test_done "$testroot" "$ret"
481 return 1
482 fi
484 cat > $testroot/got.conf.expected <<EOF
485 remote "origin" {
486 server 127.0.0.1
487 protocol ssh
488 repository "$testroot/repo"
490 EOF
491 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
492 ret="$?"
493 if [ "$ret" != "0" ]; then
494 diff -u $testroot/got.conf.expected \
495 $testroot/repo-clone/got.conf
496 test_done "$testroot" "$ret"
497 return 1
498 fi
500 cat > $testroot/config.expected <<EOF
501 [core]
502 repositoryformatversion = 0
503 filemode = true
504 bare = true
506 [remote "origin"]
507 url = ssh://127.0.0.1$testroot/repo
508 fetch = +refs/heads/master:refs/remotes/origin/master
509 EOF
510 cmp -s $testroot/repo-clone/config $testroot/config.expected
511 ret="$?"
512 if [ "$ret" != "0" ]; then
513 diff -u $testroot/config.expected \
514 $testroot/repo-clone/config
515 fi
516 test_done "$testroot" "$ret"
519 test_clone_branch_and_reference() {
520 local testroot=`test_init clone_reference`
521 local testurl=ssh://127.0.0.1/$testroot
522 local commit_id=`git_show_head $testroot/repo`
524 got branch -r $testroot/repo -c $commit_id foo
525 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
526 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
527 local tag_id=`got ref -r $testroot/repo -l \
528 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
530 got clone -q -R hoo/boo/zoo -b foo $testurl/repo $testroot/repo-clone
531 ret="$?"
532 if [ "$ret" != "0" ]; then
533 echo "got clone command failed unexpectedly" >&2
534 test_done "$testroot" "$ret"
535 return 1
536 fi
538 got ref -l -r $testroot/repo-clone > $testroot/stdout
540 echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
541 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
542 echo "refs/remotes/origin/foo: $commit_id" \
543 >> $testroot/stdout.expected
544 echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
545 >> $testroot/stdout.expected
546 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
548 cmp -s $testroot/stdout $testroot/stdout.expected
549 ret="$?"
550 if [ "$ret" != "0" ]; then
551 diff -u $testroot/stdout.expected $testroot/stdout
552 test_done "$testroot" "$ret"
553 return 1
554 fi
556 cat > $testroot/got.conf.expected <<EOF
557 remote "origin" {
558 server 127.0.0.1
559 protocol ssh
560 repository "$testroot/repo"
562 EOF
563 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
564 ret="$?"
565 if [ "$ret" != "0" ]; then
566 diff -u $testroot/got.conf.expected \
567 $testroot/repo-clone/got.conf
568 test_done "$testroot" "$ret"
569 return 1
570 fi
572 cat > $testroot/config.expected <<EOF
573 [core]
574 repositoryformatversion = 0
575 filemode = true
576 bare = true
578 [remote "origin"]
579 url = ssh://127.0.0.1$testroot/repo
580 fetch = +refs/heads/foo:refs/remotes/origin/foo
581 EOF
582 cmp -s $testroot/repo-clone/config $testroot/config.expected
583 ret="$?"
584 if [ "$ret" != "0" ]; then
585 diff -u $testroot/config.expected \
586 $testroot/repo-clone/config
587 fi
588 test_done "$testroot" "$ret"
591 test_clone_reference_mirror() {
592 local testroot=`test_init clone_reference_mirror`
593 local testurl=ssh://127.0.0.1/$testroot
594 local commit_id=`git_show_head $testroot/repo`
596 got branch -r $testroot/repo -c $commit_id foo
597 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
598 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
599 local tag_id=`got ref -r $testroot/repo -l \
600 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
602 got clone -q -R hoo -m $testurl/repo $testroot/repo-clone
603 ret="$?"
604 if [ "$ret" != "0" ]; then
605 echo "got clone command failed unexpectedly" >&2
606 test_done "$testroot" "$ret"
607 return 1
608 fi
610 got ref -l -r $testroot/repo-clone > $testroot/stdout
612 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
613 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
614 echo "refs/hoo/boo/zoo: $commit_id" >> $testroot/stdout.expected
615 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
617 cmp -s $testroot/stdout $testroot/stdout.expected
618 ret="$?"
619 if [ "$ret" != "0" ]; then
620 diff -u $testroot/stdout.expected $testroot/stdout
621 test_done "$testroot" "$ret"
622 return 1
623 fi
625 cat > $testroot/got.conf.expected <<EOF
626 remote "origin" {
627 server 127.0.0.1
628 protocol ssh
629 repository "$testroot/repo"
630 mirror-references yes
632 EOF
633 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
634 ret="$?"
635 if [ "$ret" != "0" ]; then
636 diff -u $testroot/got.conf.expected \
637 $testroot/repo-clone/got.conf
638 test_done "$testroot" "$ret"
639 return 1
640 fi
642 cat > $testroot/config.expected <<EOF
643 [core]
644 repositoryformatversion = 0
645 filemode = true
646 bare = true
648 [remote "origin"]
649 url = ssh://127.0.0.1$testroot/repo
650 fetch = +refs/*:refs/*
651 mirror = true
652 EOF
653 cmp -s $testroot/repo-clone/config $testroot/config.expected
654 ret="$?"
655 if [ "$ret" != "0" ]; then
656 diff -u $testroot/config.expected \
657 $testroot/repo-clone/config
658 fi
659 test_done "$testroot" "$ret"
662 test_parseargs "$@"
663 run_test test_clone_basic
664 run_test test_clone_list
665 run_test test_clone_branch
666 run_test test_clone_all
667 run_test test_clone_mirror
668 run_test test_clone_mirror_all
669 run_test test_clone_reference
670 run_test test_clone_branch_and_reference
671 run_test test_clone_reference_mirror