8 public function __construct(Repository $repo)
14 * Should be called right after a repository has been created,
15 * either by "git init" or "git clone".
16 * Takes care of removing hook example files and creating
17 * the git daemon export file
21 public function afterInit()
23 foreach (glob($this->repo->gitDir . '/hooks/*') as $hookfile) {
26 touch($this->repo->gitDir . '/git-daemon-export-ok');
28 $vc = $this->repo->getVc();
31 $this->repo->gitDir . '/hooks/post-update',
34 # Hook script to prepare a packed repository for use over dumb transports.
36 exec git update-server-info
40 chmod($this->repo->gitDir . '/hooks/post-update', 0755);
43 $vc->getCommand('config')
44 ->addArgument('owner.name')
45 ->addArgument($_SESSION['name'])
47 $vc->getCommand('config')
48 ->addArgument('owner.email')
49 ->addArgument($_SESSION['email'])