From: Pang Yan Han <pangyanhan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>,
Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref
Date: Wed, 28 Sep 2011 06:55:46 +0800 [thread overview]
Message-ID: <20110927225546.GA1648@myhost> (raw)
In-Reply-To: <7vhb3xyld7.fsf@alter.siamese.dyndns.org>
On Tue, Sep 27, 2011 at 09:56:52AM -0700, Junio C Hamano wrote:
> [offtopic: where does that annoying M-F-T header come from? It even seems
> to be pointless in this case as it lists the same people as are already on
> To/Cc/From of the message.]
Sorry, it's due to my lack of familiarity with mutt.
>
> Pang Yan Han <pangyanhan@gmail.com> writes:
>
> > Should I reroll this patch with this behaviour:
> >
> > - Everything as usual for valid ref updates and deletes
> > - For deleting corrupt (dangling?) ref, post-receive and post-update hooks
> > also receive the same args as per valid update / delete
>
> Suonds sensible.
>
> > - For deleting non-existent refs:
> > - post-receive shall have empty stdin for those refs
> > - post-update shall have an empty arg for those refs
>
> I do not think these hooks should see names of refs that ended up being a
> no-op. If the push is only about attempting to delete a ref that did not
> exist, these hooks should not even get called. If there were other refs
> that got updated, these hooks have to be called, but they should not be
> told about the no-op. IOW
>
> $ git push $there :no-such-ref master:refs/remotes/origin/master
>
> should:
>
> (1) not call the post-* hooks if the refs/remotes/origin/master was
> already pointing at the same commit; or
>
> (2) invoke the post-* hooks if refs/remotes/origin/master is updated, but
> should tell hooks only about the update of refs/remotes/origin/master.
>
> That is pretty much in line with how a normal attempt to push the same
> commit to an already up-to-date ref works. For example, if you:
>
> $ git push $there master next
>
> when 'master' is lagging and 'next' is already up-to-date, post-update and
> post-receive hooks run and told only about 'master' and not 'next'.
Thanks, I will reroll this later.
next prev parent reply other threads:[~2011-09-27 22:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-25 5:06 [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref Pang Yan Han
2011-09-25 5:06 ` [PATCH/RFC 1/2] is_url: Remove redundant assignment Pang Yan Han
2011-09-25 9:26 ` Tay Ray Chuan
2011-09-26 16:52 ` Junio C Hamano
2011-09-26 21:32 ` Jeff King
2011-09-25 5:06 ` [PATCH/RFC 2/2] receive-pack: Don't run update hook for corrupt or nonexistent ref Pang Yan Han
2011-09-25 17:37 ` [PATCH/RFCv2 2/2] run post-receive and post-update hooks with empty stdin/no args for invalid ref deletion Pang Yan Han
2011-09-25 7:58 ` [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref Sitaram Chamarty
2011-09-25 9:48 ` Pang Yan Han
2011-09-25 12:05 ` Sitaram Chamarty
2011-09-26 23:23 ` Junio C Hamano
2011-09-26 23:44 ` Sitaram Chamarty
2011-09-26 23:49 ` Junio C Hamano
2011-09-27 0:04 ` Junio C Hamano
2011-09-27 9:02 ` Pang Yan Han
2011-09-27 16:56 ` Junio C Hamano
2011-09-27 22:55 ` Pang Yan Han [this message]
2011-09-27 0:05 ` Sitaram Chamarty
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=20110927225546.GA1648@myhost \
--to=pangyanhan@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.