diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/phorkie/Repository.php | 8 | ||||
| -rw-r--r-- | src/phorkie/Repository/Post.php | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php index fef5656..6dec015 100644 --- a/src/phorkie/Repository.php +++ b/src/phorkie/Repository.php @@ -152,6 +152,14 @@ class Repository throw new Exception('Unknown link type'); } + public function getCloneURL($public = true) + { + $var = $public ? 'public' : 'private'; + if (isset($GLOBALS['phorkie']['cfg']['git'][$var])) { + return $GLOBALS['phorkie']['cfg']['git'][$var] . $this->id . '/.git'; + } + return null; + } } ?> diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index 627aa1f..828dbad 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -87,9 +87,13 @@ class Repository_Post $repo = $rs->createNew(); $vc = $repo->getVc(); $vc->initRepository(); + foreach (glob($repo->repoDir . '/.git/hooks/*') as $hookfile) { unlink($hookfile); } + + touch($repo->repoDir . '/.git/git-daemon-export-ok'); + return $repo; } |
