diff rhodecode/lib/middleware/simplegit.py @ 2057:766696ee9487 beta

let the is_git method exists so it is more similar to the hg backend.
author Tony Bussieres <t.bussieres@gmail.com>
date Mon, 27 Feb 2012 18:15:39 -0800
parents 851ea1139169
children fb51a6fc10ae
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py	Mon Feb 27 17:35:12 2012 -0800
+++ b/rhodecode/lib/middleware/simplegit.py	Mon Feb 27 18:15:39 2012 -0800
@@ -82,6 +82,8 @@
 
 GIT_PROTO_PAT = re.compile(r'git-upload-pack|git-receive-pack|info\/refs')
 
+def is_git(action):
+    return action in ['pull','push']
 
 class SimpleGit(BaseVCSController):
 
@@ -91,7 +93,7 @@
         #======================================================================
         action = self.__get_action(environ)
 
-        if not action in ['pull','push']:
+        if not is_git(action):
             return self.application(environ, start_response)
 
         proxy_key = 'HTTP_X_REAL_IP'