Automatically create the git repository during the cron run.

This commit is contained in:
Loic d'Anterroches 2009-01-21 20:05:03 +01:00
parent 3fbac71f04
commit 6b32413e69
2 changed files with 5 additions and 0 deletions

View File

@ -215,6 +215,9 @@ class IDF_Plugin_SyncGit_Serve
$conf = new IDF_Conf();
$conf->setProject($project);
$scm = $conf->getVal('scm', 'git');
if ($scm == 'git' and !file_exists($fullpath)) {
$this->initRepository($fullpath);
}
if ($scm != 'git' or $project->private) {
return $this->gitExportDeny($fullpath);
}

View File

@ -67,5 +67,7 @@ Pluf_Signal::connect('IDF_Project::membershipsUpdated',
array('IDF_Plugin_SyncGit', 'entry'));
Pluf_Signal::connect('IDF_Key::postSave',
array('IDF_Plugin_SyncGit', 'entry'));
Pluf_Signal::connect('IDF_Project::created',
array('IDF_Plugin_SyncGit', 'entry'));
return $m;