git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] Teach receive-pack to run pre-receive/post-receive hooks

From
Junio C Hamano <junkio@cox.net>
Date
Mar 8, 2007, 00:00 UTC
Message-ID
<7vbqj4eh9h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0703071522030.5963@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Can you give a concise explanation of how "pre-receive" differ from the 
> old "update", and how does "post-receive" differ from the old 
> "post-update"?

They are somewhat redundant. They get everything at once, unlike update hook.

The old interface is adequate to do the same thing if you arrange them so that update hook notes which refs (with what old sha1 value it had) were asked to be updated, and make your post-update hook (which gets the names of refs) notice if some of them failed and from what ref a successful update happened. But getting everything at once is sometimes easier to work with.

Previous: Linus TorvaldsNext: Shawn O. Pearce
Message 3 of 4 in “Teach receive-pack to run pre-receive/post-receive hooks”
  1. 5/5 Teach receive-pack to run pre-receive/post-receive hooksShawn O. Pearce, Mar 7, 2007
  2. Linus TorvaldsMar 7, 2007
  3. Junio C HamanoMar 8, 2007
  4. Shawn O. PearceMar 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.