diff --git a/gitosis/serve.py b/gitosis/serve.py index 9fc55bc..1bf97c1 100644 --- a/gitosis/serve.py +++ b/gitosis/serve.py @@ -40,6 +40,7 @@ COMMANDS_WRITE = [ ] def main(): + log = logging.getLogger('gitosis.serve.main') os.umask(0022) parser = getParser() @@ -53,6 +54,10 @@ def main(): if cmd is None: die("Need SSH_ORIGINAL_COMMAND in environment.") + log.debug('Got command %(cmd)r' % dict( + cmd=cmd, + )) + if '\n' in cmd: die("Command may not contain newlines.") @@ -95,6 +100,11 @@ def main(): # didn't have write access and tried to write die("Write access denied.") + log.debug('Serving %(command)r %(newpath)r' % dict( + command=command, + newpath=newpath, + )) + # put the command back together with the new path newcmd = "%(command)s '%(newpath)s'" % dict( command=command,