Thread (61 messages) flat view 61 messages, 5 authors, 1h ago

Re: [PATCH v4 1/3] doc: add proc-receive hook info in 'git-receive-pack.adoc'

From: Patrick Steinhardt <hidden>
Date: 2026-08-31 06:45:05

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.
quoted hunk ↗ jump to hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help