X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=public%2Fmirror.php;h=aa83c4836e36fd0d95ab361d337808b9d7830e0e;hb=8283f9bdf3c4a71bfd5bb9a8d102b7b6defb37c8;hp=7c80fef26ec248fd34e3020f7e20d6a4689dfe0d;hpb=6e871d7422315a8b631e2d8031dea10785fd308c;p=m6w6%2Freplicator diff --git a/public/mirror.php b/public/mirror.php index 7c80fef..aa83c48 100644 --- a/public/mirror.php +++ b/public/mirror.php @@ -46,12 +46,13 @@ switch ($evt) { $repo = $json->repository->full_name; $path = $mirror . "/" . $repo; if (is_dir($path) && chdir($path)) { - passthru("git fetch -p", $rv); + passthru("git fetch -vp 2>&1", $rv); if ($rv == 0) { $response->setResponseCode(200); } } elseif (mkdir($path, 0755, true) && chdir($path)) { - passthru("git clone --mirror " . escapeshellarg($repo) . " .", $rv); + $source = escapeshellarg($json->repository->clone_url); + passthru("git clone --mirror $source . 2>&1", $rv); if ($rv == 0) { $response->setResponseCode(200); }