From: "Shawn O. Pearce" <spearce@spearce•org>
To: Junio C Hamano <junkio@cox•net>
Cc: Linus Torvalds <torvalds@linux-foundation•org>, git@vger•kernel.org
Subject: Re: [PATCH 5/5] Teach receive-pack to run pre-receive/post-receive hooks
Date: Wed, 7 Mar 2007 22:34:34 -0500 [thread overview]
Message-ID: <20070308033434.GA29567@spearce.org> (raw)
In-Reply-To: <7vbqj4eh9h.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox•net> wrote:
> 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.
Also unlike update hook, pre-receive rejects or accepts the entire
batch of refs and cannot reject an individual ref update.
I would have removed post-update, but users depend on it. I would
have modified its argument structure to be like post-receive,
but again, users might depend on the current argument arrangement.
> 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.
Except that doing that is horribly ugly, as there are no locks held
by receive-pack to help the hook author, so the hook author must dump
that data out to a temporary file and be sure the post-update hook
knows which file to look at, which it can't really know... a mess.
--
Shawn.
prev parent reply other threads:[~2007-03-08 3:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 21:52 [PATCH 5/5] Teach receive-pack to run pre-receive/post-receive hooks Shawn O. Pearce
2007-03-07 23:31 ` Linus Torvalds
2007-03-08 0:00 ` Junio C Hamano
2007-03-08 3:34 ` Shawn O. Pearce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070308033434.GA29567@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
--cc=torvalds@linux-foundation$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox