{
$new = $this->fork($repo->gitDir);
\copy($repo->gitDir . '/description', $new->gitDir . '/description');
+ $this->index($new);
return $new;
}
$new->gitDir . '/description',
'Fork of ' . $originalUrl
);
+ $this->index($new);
return $new;
}
foreach (\glob($new->gitDir . '/hooks/*') as $hookfile) {
\unlink($hookfile);
}
+
return $new;
}
+
+ protected function index($repo)
+ {
+ $db = new Database();
+ $db->getIndexer()->addRepo($repo);
+ }
}
?>