diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2019-06-09 04:31:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-09 04:32:31 +0000 |
commit | 0886c264b24b8bc7626e5a7eb59598b0229f066d (patch) | |
tree | 0091b2a341c4ff824cb564687c2533f8980b5a86 /t/v2mirror.t | |
parent | 279a47f3f64fc7a414247922b870e58a0b334b0f (diff) | |
download | public-inbox-0886c264b24b8bc7626e5a7eb59598b0229f066d.tar.gz |
And use it in manifest.js. To ease maintaining mirrors with grokmirror(1), we can accept a "git/" directory prefix before the epoch, and ".git" suffix after the epoch number. We maintain compatibility with "$INBOX/$EPOCH" cloning, of course, and it's still easier-to-type on the command-line.
Diffstat (limited to 't/v2mirror.t')
-rw-r--r-- | t/v2mirror.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/v2mirror.t b/t/v2mirror.t index fe05ec4d..c31dcd5b 100644 --- a/t/v2mirror.t +++ b/t/v2mirror.t @@ -80,11 +80,13 @@ $sock = undef; my @cmd; foreach my $i (0..$epoch_max) { - @cmd = (qw(git clone --mirror -q), "http://$host:$port/v2/$i", + my $sfx = $i == 0 ? '.git' : ''; + @cmd = (qw(git clone --mirror -q), + "http://$host:$port/v2/$i$sfx", "$tmpdir/m/git/$i.git"); - is(system(@cmd), 0, 'cloned OK'); - ok(-d "$tmpdir/m/git/$i.git", 'mirror OK'); + is(system(@cmd), 0, "cloned $i.git"); + ok(-d "$tmpdir/m/git/$i.git", "mirror $i OK"); } @cmd = ("$script-init", '-V2', 'm', "$tmpdir/m", 'http://example.com/m', |