3 # Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
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.
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.
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
26 if [ $ret -ne 0 ]; then
27 echo "got clone command failed unexpectedly" >&2
28 test_done "$testroot" "$ret"
32 got log -l0 -p -r $testroot/repo > $testroot/log-repo
33 if [ $ret -ne 0 ]; then
34 echo "got log command failed unexpectedly" >&2
35 test_done "$testroot" "$ret"
38 got log -l0 -p -r $testroot/repo > $testroot/log-repo-clone
39 if [ $ret -ne 0 ]; then
40 echo "got log command failed unexpectedly" >&2
41 test_done "$testroot" "$ret"
44 cmp -s $testroot/log-repo $testroot/log-repo-clone
46 if [ $ret -ne 0 ]; then
47 echo "log -p output of cloned repository differs" >&2
48 test_done "$testroot" "$ret"
52 got ref -l -r $testroot/repo > $testroot/stdout
53 if [ $ret -ne 0 ]; then
54 echo "got ref command failed unexpectedly" >&2
55 test_done "$testroot" "$ret"
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
64 if [ $ret -ne 0 ]; then
65 diff -u $testroot/stdout.expected $testroot/stdout
66 test_done "$testroot" "$ret"
70 got ref -l -r $testroot/repo-clone > $testroot/stdout
71 if [ $ret -ne 0 ]; then
72 echo "got ref command failed unexpectedly" >&2
73 test_done "$testroot" "$ret"
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
86 if [ $ret -ne 0 ]; then
87 diff -u $testroot/stdout.expected $testroot/stdout
88 test_done "$testroot" "$ret"
92 cat > $testroot/got.conf.expected <<EOF
96 repository "$testroot/repo"
100 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
102 if [ $ret -ne 0 ]; then
103 diff -u $testroot/got.conf.expected \
104 $testroot/repo-clone/got.conf
105 test_done "$testroot" "$ret"
109 cat > $testroot/config.expected <<EOF
111 repositoryformatversion = 0
116 url = ssh://127.0.0.1$testroot/repo
117 fetch = refs/heads/master:refs/remotes/origin/master
118 fetch = refs/tags/*:refs/tags/*
120 cmp -s $testroot/repo-clone/config $testroot/config.expected
122 if [ $ret -ne 0 ]; then
123 diff -u $testroot/config.expected \
124 $testroot/repo-clone/config
126 test_done "$testroot" "$ret"
130 local testroot=`test_init clone_list`
131 local testurl=ssh://127.0.0.1/$testroot
132 local commit_id=`git_show_head $testroot/repo`
134 got branch -r $testroot/repo -c $commit_id foo
135 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
136 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
138 got clone -l $testurl/repo > $testroot/stdout 2>$testroot/stderr
140 if [ $ret -ne 0 ]; then
141 echo "got clone command failed unexpectedly" >&2
142 test_done "$testroot" "$ret"
146 echo "Connecting to 127.0.0.1" > $testroot/stdout.expected
147 got ref -l -r $testroot/repo >> $testroot/stdout.expected
149 cmp -s $testroot/stdout $testroot/stdout.expected
151 if [ $ret -ne 0 ]; then
152 diff -u $testroot/stdout.expected $testroot/stdout
154 test_done "$testroot" "$ret"
157 test_clone_branch() {
158 local testroot=`test_init clone_branch`
159 local testurl=ssh://127.0.0.1/$testroot
160 local commit_id=`git_show_head $testroot/repo`
162 got branch -r $testroot/repo -c $commit_id foo
163 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
164 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
165 local tag_id=`got ref -r $testroot/repo -l \
166 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
168 got clone -q -b foo $testurl/repo $testroot/repo-clone
170 if [ $ret -ne 0 ]; then
171 echo "got clone command failed unexpectedly" >&2
172 test_done "$testroot" "$ret"
176 got ref -l -r $testroot/repo-clone > $testroot/stdout
178 echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
179 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
180 # refs/heads/master is missing because it wasn't passed via -b
181 echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
182 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
183 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
185 cmp -s $testroot/stdout $testroot/stdout.expected
187 if [ $ret -ne 0 ]; then
188 diff -u $testroot/stdout.expected $testroot/stdout
189 test_done "$testroot" "$ret"
193 cat > $testroot/got.conf.expected <<EOF
197 repository "$testroot/repo"
201 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
203 if [ $ret -ne 0 ]; then
204 diff -u $testroot/got.conf.expected \
205 $testroot/repo-clone/got.conf
206 test_done "$testroot" "$ret"
210 cat > $testroot/config.expected <<EOF
212 repositoryformatversion = 0
217 url = ssh://127.0.0.1$testroot/repo
218 fetch = refs/heads/foo:refs/remotes/origin/foo
219 fetch = refs/tags/*:refs/tags/*
221 cmp -s $testroot/repo-clone/config $testroot/config.expected
223 if [ $ret -ne 0 ]; then
224 diff -u $testroot/config.expected \
225 $testroot/repo-clone/config
227 test_done "$testroot" "$ret"
231 local testroot=`test_init clone_all`
232 local testurl=ssh://127.0.0.1/$testroot
233 local commit_id=`git_show_head $testroot/repo`
235 got branch -r $testroot/repo -c $commit_id foo
236 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
237 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
238 local tag_id=`got ref -r $testroot/repo -l \
239 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
241 got clone -q -a $testurl/repo $testroot/repo-clone
243 if [ $ret -ne 0 ]; then
244 echo "got clone command failed unexpectedly" >&2
245 test_done "$testroot" "$ret"
249 got ref -l -r $testroot/repo-clone > $testroot/stdout
251 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
252 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
253 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
254 echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
255 >> $testroot/stdout.expected
256 echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
257 echo "refs/remotes/origin/master: $commit_id" \
258 >> $testroot/stdout.expected
259 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
260 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
262 cmp -s $testroot/stdout $testroot/stdout.expected
264 if [ $ret -ne 0 ]; then
265 diff -u $testroot/stdout.expected $testroot/stdout
266 test_done "$testroot" "$ret"
270 cat > $testroot/got.conf.expected <<EOF
274 repository "$testroot/repo"
275 fetch-all-branches yes
278 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
280 if [ $ret -ne 0 ]; then
281 diff -u $testroot/got.conf.expected \
282 $testroot/repo-clone/got.conf
283 test_done "$testroot" "$ret"
287 cat > $testroot/config.expected <<EOF
289 repositoryformatversion = 0
294 url = ssh://127.0.0.1$testroot/repo
295 fetch = refs/heads/*:refs/remotes/origin/*
296 fetch = refs/tags/*:refs/tags/*
298 cmp -s $testroot/repo-clone/config $testroot/config.expected
300 if [ $ret -ne 0 ]; then
301 diff -u $testroot/config.expected \
302 $testroot/repo-clone/config
304 test_done "$testroot" "$ret"
307 test_clone_mirror() {
308 local testroot=`test_init clone_mirror`
309 local testurl=ssh://127.0.0.1/$testroot
310 local commit_id=`git_show_head $testroot/repo`
312 got branch -r $testroot/repo -c $commit_id foo
313 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
314 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
315 local tag_id=`got ref -r $testroot/repo -l \
316 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
318 got clone -q -m $testurl/repo $testroot/repo-clone
320 if [ $ret -ne 0 ]; then
321 echo "got clone command failed unexpectedly" >&2
322 test_done "$testroot" "$ret"
326 got ref -l -r $testroot/repo-clone > $testroot/stdout
328 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
329 # refs/heads/foo is missing because we're not fetching all branches
330 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
331 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
332 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
334 cmp -s $testroot/stdout $testroot/stdout.expected
336 if [ $ret -ne 0 ]; then
337 diff -u $testroot/stdout.expected $testroot/stdout
338 test_done "$testroot" "$ret"
342 cat > $testroot/got.conf.expected <<EOF
346 repository "$testroot/repo"
348 mirror-references yes
351 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
353 if [ $ret -ne 0 ]; then
354 diff -u $testroot/got.conf.expected \
355 $testroot/repo-clone/got.conf
356 test_done "$testroot" "$ret"
360 cat > $testroot/config.expected <<EOF
362 repositoryformatversion = 0
367 url = ssh://127.0.0.1$testroot/repo
368 fetch = refs/heads/master:refs/heads/master
369 fetch = refs/tags/*:refs/tags/*
371 cmp -s $testroot/repo-clone/config $testroot/config.expected
373 if [ $ret -ne 0 ]; then
374 diff -u $testroot/config.expected \
375 $testroot/repo-clone/config
377 test_done "$testroot" "$ret"
380 test_clone_mirror_all() {
381 local testroot=`test_init clone_mirror_all`
382 local testurl=ssh://127.0.0.1/$testroot
383 local commit_id=`git_show_head $testroot/repo`
385 got branch -r $testroot/repo -c $commit_id foo
386 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
387 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
388 local tag_id=`got ref -r $testroot/repo -l \
389 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
391 got clone -q -m -a $testurl/repo $testroot/repo-clone
393 if [ $ret -ne 0 ]; then
394 echo "got clone command failed unexpectedly" >&2
395 test_done "$testroot" "$ret"
399 got ref -l -r $testroot/repo-clone > $testroot/stdout
401 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
402 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
403 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
404 # refs/hoo/boo/zoo is missing because it is outside of refs/heads
405 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
407 cmp -s $testroot/stdout $testroot/stdout.expected
409 if [ $ret -ne 0 ]; then
410 diff -u $testroot/stdout.expected $testroot/stdout
411 test_done "$testroot" "$ret"
415 cat > $testroot/got.conf.expected <<EOF
419 repository "$testroot/repo"
420 mirror-references yes
421 fetch-all-branches yes
424 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
426 if [ $ret -ne 0 ]; then
427 diff -u $testroot/got.conf.expected \
428 $testroot/repo-clone/got.conf
429 test_done "$testroot" "$ret"
433 cat > $testroot/config.expected <<EOF
435 repositoryformatversion = 0
440 url = ssh://127.0.0.1$testroot/repo
441 fetch = refs/heads/*:refs/heads/*
442 fetch = refs/tags/*:refs/tags/*
444 cmp -s $testroot/repo-clone/config $testroot/config.expected
446 if [ $ret -ne 0 ]; then
447 diff -u $testroot/config.expected \
448 $testroot/repo-clone/config
450 test_done "$testroot" "$ret"
453 test_clone_reference() {
454 local testroot=`test_init clone_reference`
455 local testurl=ssh://127.0.0.1/$testroot
456 local commit_id=`git_show_head $testroot/repo`
458 got branch -r $testroot/repo -c $commit_id foo
459 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
460 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
461 local tag_id=`got ref -r $testroot/repo -l \
462 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
464 got clone -q -R hoo $testurl/repo $testroot/repo-clone
466 if [ $ret -ne 0 ]; then
467 echo "got clone command failed unexpectedly" >&2
468 test_done "$testroot" "$ret"
472 got ref -l -r $testroot/repo-clone > $testroot/stdout
474 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
475 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
476 echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
477 >> $testroot/stdout.expected
478 echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
479 >> $testroot/stdout.expected
480 echo "refs/remotes/origin/master: $commit_id" \
481 >> $testroot/stdout.expected
482 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
484 cmp -s $testroot/stdout $testroot/stdout.expected
486 if [ $ret -ne 0 ]; then
487 diff -u $testroot/stdout.expected $testroot/stdout
488 test_done "$testroot" "$ret"
492 cat > $testroot/got.conf.expected <<EOF
496 repository "$testroot/repo"
501 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
503 if [ $ret -ne 0 ]; then
504 diff -u $testroot/got.conf.expected \
505 $testroot/repo-clone/got.conf
506 test_done "$testroot" "$ret"
510 cat > $testroot/config.expected <<EOF
512 repositoryformatversion = 0
517 url = ssh://127.0.0.1$testroot/repo
518 fetch = refs/heads/master:refs/remotes/origin/master
519 fetch = refs/hoo:refs/remotes/origin/hoo
520 fetch = refs/tags/*:refs/tags/*
522 cmp -s $testroot/repo-clone/config $testroot/config.expected
524 if [ $ret -ne 0 ]; then
525 diff -u $testroot/config.expected \
526 $testroot/repo-clone/config
528 test_done "$testroot" "$ret"
531 test_clone_branch_and_reference() {
532 local testroot=`test_init clone_reference`
533 local testurl=ssh://127.0.0.1/$testroot
534 local commit_id=`git_show_head $testroot/repo`
536 got branch -r $testroot/repo -c $commit_id foo
537 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
538 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
539 local tag_id=`got ref -r $testroot/repo -l \
540 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
542 got clone -q -R hoo/boo/zoo -b foo $testurl/repo $testroot/repo-clone
544 if [ $ret -ne 0 ]; then
545 echo "got clone command failed unexpectedly" >&2
546 test_done "$testroot" "$ret"
550 got ref -l -r $testroot/repo-clone > $testroot/stdout
552 echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
553 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
554 echo "refs/remotes/origin/foo: $commit_id" \
555 >> $testroot/stdout.expected
556 echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
557 >> $testroot/stdout.expected
558 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
560 cmp -s $testroot/stdout $testroot/stdout.expected
562 if [ $ret -ne 0 ]; then
563 diff -u $testroot/stdout.expected $testroot/stdout
564 test_done "$testroot" "$ret"
568 cat > $testroot/got.conf.expected <<EOF
572 repository "$testroot/repo"
574 reference { "hoo/boo/zoo" }
577 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
579 if [ $ret -ne 0 ]; then
580 diff -u $testroot/got.conf.expected \
581 $testroot/repo-clone/got.conf
582 test_done "$testroot" "$ret"
586 cat > $testroot/config.expected <<EOF
588 repositoryformatversion = 0
593 url = ssh://127.0.0.1$testroot/repo
594 fetch = refs/heads/foo:refs/remotes/origin/foo
595 fetch = refs/hoo/boo/zoo:refs/remotes/origin/hoo/boo/zoo
596 fetch = refs/tags/*:refs/tags/*
598 cmp -s $testroot/repo-clone/config $testroot/config.expected
600 if [ $ret -ne 0 ]; then
601 diff -u $testroot/config.expected \
602 $testroot/repo-clone/config
604 test_done "$testroot" "$ret"
607 test_clone_reference_mirror() {
608 local testroot=`test_init clone_reference_mirror`
609 local testurl=ssh://127.0.0.1/$testroot
610 local commit_id=`git_show_head $testroot/repo`
612 got branch -r $testroot/repo -c $commit_id foo
613 got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
614 got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
615 local tag_id=`got ref -r $testroot/repo -l \
616 | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
618 got clone -q -R hoo -m $testurl/repo $testroot/repo-clone
620 if [ $ret -ne 0 ]; then
621 echo "got clone command failed unexpectedly" >&2
622 test_done "$testroot" "$ret"
626 got ref -l -r $testroot/repo-clone > $testroot/stdout
628 echo "HEAD: refs/heads/master" > $testroot/stdout.expected
629 echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
630 echo "refs/hoo/boo/zoo: $commit_id" >> $testroot/stdout.expected
631 echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
633 cmp -s $testroot/stdout $testroot/stdout.expected
635 if [ $ret -ne 0 ]; then
636 diff -u $testroot/stdout.expected $testroot/stdout
637 test_done "$testroot" "$ret"
641 cat > $testroot/got.conf.expected <<EOF
645 repository "$testroot/repo"
648 mirror-references yes
651 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
653 if [ $ret -ne 0 ]; then
654 diff -u $testroot/got.conf.expected \
655 $testroot/repo-clone/got.conf
656 test_done "$testroot" "$ret"
660 cat > $testroot/config.expected <<EOF
662 repositoryformatversion = 0
667 url = ssh://127.0.0.1$testroot/repo
668 fetch = refs/heads/master:refs/heads/master
669 fetch = refs/hoo:refs/hoo
670 fetch = refs/tags/*:refs/tags/*
672 cmp -s $testroot/repo-clone/config $testroot/config.expected
674 if [ $ret -ne 0 ]; then
675 diff -u $testroot/config.expected \
676 $testroot/repo-clone/config
678 test_done "$testroot" "$ret"
681 test_clone_multiple_branches() {
682 local testroot=`test_init clone_multiple_branches`
683 local testurl=ssh://127.0.0.1/$testroot
684 local commit_id=`git_show_head $testroot/repo`
686 got branch -r $testroot/repo -c $commit_id foo
687 got branch -r $testroot/repo -c $commit_id bar
689 got clone -q -b foo -b bar $testurl/repo $testroot/repo-clone
691 if [ $ret -ne 0 ]; then
692 echo "got clone command failed unexpectedly" >&2
693 test_done "$testroot" "$ret"
697 got ref -l -r $testroot/repo-clone > $testroot/stdout
699 echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
700 echo "refs/heads/bar: $commit_id" >> $testroot/stdout.expected
701 echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
702 echo "refs/remotes/origin/bar: $commit_id" \
703 >> $testroot/stdout.expected
704 echo "refs/remotes/origin/foo: $commit_id" \
705 >> $testroot/stdout.expected
707 cmp -s $testroot/stdout $testroot/stdout.expected
709 if [ $ret -ne 0 ]; then
710 diff -u $testroot/stdout.expected $testroot/stdout
711 test_done "$testroot" "$ret"
715 cat > $testroot/got.conf.expected <<EOF
719 repository "$testroot/repo"
720 branch { "foo" "bar" }
723 cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
725 if [ $ret -ne 0 ]; then
726 diff -u $testroot/got.conf.expected \
727 $testroot/repo-clone/got.conf
728 test_done "$testroot" "$ret"
732 cat > $testroot/config.expected <<EOF
734 repositoryformatversion = 0
739 url = ssh://127.0.0.1$testroot/repo
740 fetch = refs/heads/foo:refs/remotes/origin/foo
741 fetch = refs/heads/bar:refs/remotes/origin/bar
742 fetch = refs/tags/*:refs/tags/*
744 cmp -s $testroot/repo-clone/config $testroot/config.expected
746 if [ $ret -ne 0 ]; then
747 diff -u $testroot/config.expected \
748 $testroot/repo-clone/config
750 test_done "$testroot" "$ret"
754 run_test test_clone_basic
755 run_test test_clone_list
756 run_test test_clone_branch
757 run_test test_clone_all
758 run_test test_clone_mirror
759 run_test test_clone_mirror_all
760 run_test test_clone_reference
761 run_test test_clone_branch_and_reference
762 run_test test_clone_reference_mirror
763 run_test test_clone_multiple_branches