From: Christian Weiske Date: Mon, 26 Mar 2012 22:16:43 +0000 (+0200) Subject: remove hook examples X-Git-Tag: v0.1.0~96 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/e48b75e0a9725b173c8fec5dabaab865669fa127 remove hook examples --- diff --git a/README.rst b/README.rst index d03eb04..b1c2522 100644 --- a/README.rst +++ b/README.rst @@ -54,3 +54,4 @@ TODO - sidebar: history - image upload - rst rendering +- document how to keep disk usage low (block size) diff --git a/www/fork.php b/www/fork.php index 5004945..6bec5f0 100644 --- a/www/fork.php +++ b/www/fork.php @@ -14,6 +14,10 @@ $new->getVc()->getCommand('clone') ->addArgument($new->repoDir) ->execute(); \copy($repo->repoDir . '/.git/description', $new->repoDir . '/.git/description'); +foreach (glob($new->repoDir . '/.git/hooks/*') as $hookfile) { + unlink($hookfile); +} + //FIXME: where to put fork source link? redirect($new->getLink('display')); ?> \ No newline at end of file diff --git a/www/index.php b/www/index.php index 8fc2405..044ac35 100644 --- a/www/index.php +++ b/www/index.php @@ -18,6 +18,9 @@ if (isset($_POST['file'])) { $repo = $rs->createNew(); $vc = $repo->getVc(); $vc->initRepository(); + foreach (glob($repo->repoDir . '/.git/hooks/*') as $hookfile) { + unlink($hookfile); + } file_put_contents($repo->repoDir . '.git/description', $_POST['description']); foreach ($_POST['file'] as $num => $arFile) {