Expose current user to hooks as environment variable GITOSIS_USER

This commit is contained in:
Tommi Virtanen 2015-01-22 11:53:01 -08:00
parent 2d971ca95c
commit 678f196311

View file

@ -200,6 +200,7 @@ class Main(app.App):
sys.exit(1)
main_log.debug('Serving %s', newcmd)
os.environ['GITOSIS_USER'] = user
os.execvp('git', ['git', 'shell', '-c', newcmd])
main_log.error('Cannot execute git-shell.')
sys.exit(1)