disabling chat bits, should really work on core functionaly first.
[gwvp-mini.git] / gwvpmini / gwvpmini_gitbackend.php
index 8e4dc5f..5aeedcf 100644 (file)
@@ -380,7 +380,7 @@ function gwvpmini_callGitBackend($username, $repo)
                                        usleep(200000);
                                        // error_log("sleep tick");
                                        $stlimit++;
-                                       if($stlimit > 2) $continue = false;
+                                       if($stlimit > 50) $continue = false;
                                } else {
                                        $stlimit = 0;
                                        // error_log("sizes: $client_len, $cgi_len");
@@ -413,18 +413,23 @@ function gwvpmini_repoExists($name)
 // 0 - anyone can clone/read, only owner can write
 // 1 - noone can clone/read, repo is visible (i.e. name), only owner can read/write repo
 // 2 - only owner can see anything
-function gwvpmini_createGitRepo($name, $ownerid, $desc)
+function gwvpmini_createGitRepo($name, $ownerid, $desc, $clonefrom)
 {
        $repo_base = gwvpmini_getConfigVal("repodir");
        
+       if($clonefrom !== false) {
+               
+       } else {
+       
        // phew, this works, but i tell you this - bundles arent quite as nice as they should be
        // 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");
-
-       // gwvpmini_AddRepo($reponame, $repodesc, $repoowner, $defaultperms = 0)
-       gwvpmini_AddRepo($name, $desc, $ownerid);
+               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");
+       
+               // gwvpmini_AddRepo($reponame, $repodesc, $repoowner, $defaultperms = 0)
+               gwvpmini_AddRepo($name, $desc, $ownerid, $clonefrom);
+       }
        
        return true;
 }