}
-function gwvp_repoPermissionCheck()
+function gwvp_repoPermissionCheck($repo, $user)
{
return true;
}
else return false;
}
-function gwvp_createGitRepo($name)
+function gwvp_createGitRepo($name, $bundle=null)
{
global $repo_base;
- error_log("would create $repo_base/$name.git");
+ // phew, this works, but i tell you this - bundles arent quite as nice as they should be
+ if($bundle == null) {
+ error_log("would create $repo_base/$name.git");
+ exec("/usr/bin/git init $repo_base/$name.git --bare > /tmp/gitlog 2>&1");
+ chdir("$repo_base/$name.git");
+ exec("/usr/bin/git update-server-info");
+ } else {
+ error_log("create via mirror on $repo_base/$name.git");
+ exec("/usr/bin/git clone --mirror $bundle $repo_base/$name.git > /tmp/gitlog 2>&1");
+ chdir("$repo_base/$name.git");
+ exec("/usr/bin/git update-server-info");
+ }
return true;
}