From: Patrick Steinhardt Date: Mon, 31 Aug 2026 06:44:54 GMT Subject: Re: [PATCH v4 1/3] doc: add proc-receive hook info in 'git-receive-pack.adoc' Message-ID: In-Reply-To: <20260826-758-introduce-hook-v4-1-6b14975ad957@gmail.com> On Wed, Aug 26, 2026 at 12:19:37PM +0200, Karthik Nayak wrote: > The 'Documentation/git-receive-pack.adoc' contains documentation about > hooks which lie in the lifecycle of 'git-receive-pack(1)'. Unfortunately > it is missing information about the 'proc-receive' hook. Add it. I think this reads a tiny bit awkward. How about the following instead: The manpage of git-receive-pack(1) documents hooks invoked when receiving a push. The manpage doe snot mention the 'proc-receive' hook though, which is also invoked as part of that process. Add a paragraph about this hook to plug that gap. > diff --git a/Documentation/git-receive-pack.adoc b/Documentation/git-receive-pack.adoc > index 0956086d61..4349487e6a 100644 > --- a/Documentation/git-receive-pack.adoc > +++ b/Documentation/git-receive-pack.adoc > @@ -236,6 +236,12 @@ if the repository is packed and is served via a dumb transport. > exec git update-server-info > ---- > > +PROC-RECEIVE HOOK > +----------------- > +This hook is invoked by 'git-receive-pack' when it processes push s/'git-receive-pack'/linkgit:git-receive-pack[1]/ > +requests. It handles refs whose names match the patterns defined by > +`receive.procReceiveRefs` and executes the actual ref updates. See > +linkgit:githooks[5] for the full protocol description. Instead of reinventing the wheel, we could also just copy the first paragraph of githooks(5): This hook is invoked by git-receive-pack(1). If the server has set the multi-valued config variable receive.procReceiveRefs, and the commands sent to receive-pack have matching reference names, these commands will be executed by this hook, instead of by the internal execute_commands() function. This hook is responsible for updating the relevant references and reporting the results back to receive-pack. I think this is quite a good summary of what it does, and for everything else we can then still provide the link to the manpage. Patrick