blob: fefb5bca04606f2f117827cdda1c241ba59fd345 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/usr/bin/perl
use strict;
use warnings;
# this is hardcoded; change it if needed
use lib "src/lib";
use Gitolite::Test;
my $h = $ENV{HOME};
# fork command
# ----------------------------------------------------------------------
try "plan 16";
my $rb = `gitolite query-rc -n GL_REPO_BASE`;
try "sed -ie 's%.Mirroring.,%\"Mirroring\",\\n\"create-with-reference\",%' ~/.gitolite.rc";
confreset;confadd '
repo source
RW+ = u1 u2
repo fork
RW+ = u1 u2
option reference.repo = source
repo multifork
RW+ = u1 u2
option reference.repo-1 = source
option reference.repo-2 = fork
';
try "ADMIN_PUSH set1; !/FATAL/" or die text();
try " # Verify files
# source doesn't have alternates
ls $rb/source.git/objects/info/alternates; !ok
# fork has source as an alternate
ls $rb/fork.git/objects/info/alternates; ok
cat $rb/fork.git/objects/info/alternates; ok; /$rb/source.git/objects/
# multifork has multiple alternates
ls $rb/multifork.git/objects/info/alternates; ok
cat $rb/multifork.git/objects/info/alternates; ok; /$rb/source.git/objects/
/$rb/fork.git/objects/
";
|