Open milki opened 10 years ago
This is my pre-receive patch https://github.com/jelmer/dulwich/pull/214
Some news about this feature ?
On Fri, Aug 15, 2014 at 01:13:43AM -0700, Stéphane Klein wrote:
Some news about this feature ? I followed up to your pull request with some comments (https://github.com/jelmer/dulwich/pull/214).
There is nobody else (beside you) actively working on this feature as far as I know.
We have client-side shell hooks. Let's implement some of the server-side shell hooks.
pre-receive, post-receive, update is pretty straightforward (https://www.kernel.org/pub/software/scm/git/docs/githooks.html). We can add those calls before and after receiving packs from the client in the ReceivePackHandler: https://github.com/jelmer/dulwich/blob/master/dulwich/server.py#L820
The git analogue is https://github.com/git/git/blob/583b61c1af1bac12d6b48b2583ad508b5ab9964c/builtin/receive-pack.c#L798 and https://github.com/git/git/blob/583b61c1af1bac12d6b48b2583ad508b5ab9964c/builtin/receive-pack.c#L1198
The status of the post-receive and update hooks can be safely ignored. pre-receive should abort the push on failure.
stderr should be redirected back to the client (report_status? - https://github.com/jelmer/dulwich/blob/master/dulwich/server.py#L762)