Added the post-update hook at the creation of the git repository.

This commit is contained in:
Loic d'Anterroches
2010-04-14 13:31:30 +02:00
parent e5ee6d8fca
commit bbc29c889f
4 changed files with 29 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ class IDF_Plugin_SyncGit
{
// Find the corresponding project.
$git_dir = substr($params['git_dir'], 0, -4); // Chop the ".git"
$elts = explode('#/#', $git_dir, -1, PREG_SPLIT_NO_EMPTY);
$elts = preg_split('#/#', $git_dir, -1, PREG_SPLIT_NO_EMPTY);
$pname = array_pop($elts);
try {
$project = IDF_Project::getOr404($pname);