gitlabhq/grack — pull request #2 by datr (2013-11-17 23:58:52+00:00)
Title: Change the working directory to the repository when executing a service rpc call

service_rpc calls IO.popen to create a subprocess to run the git command in. The
sub-process does not use the same CWD as the ruby process but where ever the
script was started from.

If the script was started from a directory that has a broken git repository in it,
git will attempt to process this repository first when starting up. This causes an
error to be thrown and no response to be sent to the client.

This manifests itself to a client as a git clone over http hanging and failing to
proceed.