From: paulr Date: Fri, 4 Nov 2011 09:45:34 +0000 (+1100) Subject: git backend stuff X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=commitdiff_plain;h=eafd2fd6a4a6a3f5866780e0b9e07e1b83ea6be7 git backend stuff --- diff --git a/gwvplib/gwvpgitcontrol.php b/gwvplib/gwvpgitcontrol.php index 978e3bf..b5c7c49 100644 --- a/gwvplib/gwvpgitcontrol.php +++ b/gwvplib/gwvpgitcontrol.php @@ -27,6 +27,17 @@ function gwvp_gitBackendInterface() // we need to quite a bit of parsing in here. The "repo" will always be /git/repo.git // but if we get here from a browser, we need to forward back to a normal repo viewer // the only way i can think of doing this is to check the useragent for the word "git" + + /* + * here we need to + * 1) figure out the repo its acessing + * 2) figure out the perms on the repo + * 3) determine if its a pull or a push + * - if its a pull, we just serve straight from the fs + * - if its a push, we go thru git-http-backend + * 4) if it requiers auth, we push to auth + * + */ $agent = "git-unknown"; $isgitagent = false; if(isset($_SERVER["HTTP_USER_AGENT"])) {