progrium/dokku — pull request #270 by plietar (2013-10-27 23:12:51+00:00)
Title: Replace gitreceive by a git plugin.

This PR replaces gitreceive by a dokku plugin.

The git receive-pack and upload-pack are ran as any other dokku command, through the command hook.
This removes the need for two distinct users.

Fixes #269 as the dokku user creates the repository, and is the only user to access them.

Moreover, because the git related-code is now a plugin, the dokku core is independant from the receiving method, and git could easily be replaced by a mercurial or bazaar plugin.

The repositories are now located in the dokku user's home, /home/dokku by default, with the same structure as before.

This causes two compatibilty issues :
* Existing plugin which had the /home/git path hardcoded won't work. I've updated all the code is this repository to use $HOME instead, but 3rdparty plugins won't be compatible, although the fix is simple.
* Existing apps need to be moved to the new location. Because the git pre-receive hook was changed, the simplest method is probably removing the /home/git directory, and repushing all the apps.

The PR might needs some improvement, I just discovered dokku yesterday so I am probably missing some concepts.