Description
JGit supports setting post-receive and pre-receive hooks on ReceivePack instances. It should be possible to use them with GitPackCommand, e.g. by allowing users to set suppliers of PostReceiveHook and PreReceiveHook on GitPackCommandFactory objects.
Motivation
There is currently no way to hook into the Git command handling, which means that what happens on remote updates of Git repos is completely opaque to users of mina-sshd. This is very limiting, since it makes it impossible to, for example, prevent certain refs from being pushed to, preventing force pushes (pre-receive) or kicking off something else if pushing succeeded (post-receive).
Alternatives considered
From what I've read, JGit is supposed to be able to run hooks that are on disk as executable files in the hooks directory, but it seems like this support is missing from ReceivePack. I haven't managed to get JGit to run those hooks either.
Additional context
/
Description
JGit supports setting post-receive and pre-receive hooks on
ReceivePackinstances. It should be possible to use them withGitPackCommand, e.g. by allowing users to set suppliers ofPostReceiveHookandPreReceiveHookonGitPackCommandFactoryobjects.Motivation
There is currently no way to hook into the Git command handling, which means that what happens on remote updates of Git repos is completely opaque to users of mina-sshd. This is very limiting, since it makes it impossible to, for example, prevent certain refs from being pushed to, preventing force pushes (pre-receive) or kicking off something else if pushing succeeded (post-receive).
Alternatives considered
From what I've read, JGit is supposed to be able to run hooks that are on disk as executable files in the
hooksdirectory, but it seems like this support is missing fromReceivePack. I haven't managed to get JGit to run those hooks either.Additional context
/