git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sitaram Chamarty <sitaramc@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Pang Yan Han <pangyanhan@gmail.com>,
	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: Tue, 27 Sep 2011 05:35:33 +0530	[thread overview]
Message-ID: <CAMK1S_gZFxtCwUnzRU3PocB9LcewZ-f5RyraCebJdaBASODaPg@mail.gmail.com> (raw)
In-Reply-To: <7voby6zwxg.fsf@alter.siamese.dyndns.org>

On Tue, Sep 27, 2011 at 5:19 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Sitaram Chamarty <sitaramc@gmail.com> writes:
>
>>> In that case (if "non-existent-ref" was indeed non-existent, and not just
>>> pointing at a dangling commit), I would say the post anything hook should
>>> not be called for that ref. These hooks of course need to run if there
>>> are _other_ refs that were updated, though, to handle these _other_ refs,
>>> but I do not think they should be told about the no-op.
>>
>> Question is what happens if none of them existed.  It's a difference
>> between not calling the hook at all, versus calling it with no
>> arguments/empty stdin (as the case may be) -- which would you do?
>
> In case it was unclear, I was trying to say the hooks should not run with
> empty input.

I saw "should not be called for that ref" and I did get confused;
thanks for clarifying.

I perfectly fine with it for post-{update,receive}.  My interest is in
making sure the *update* hook runs, which (in an earlier email in the
thread) I explained why and you agreed it made sense.

Thanks,

-- 
Sitaram

      parent reply	other threads:[~2011-09-27  0:05 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
2011-09-27  0:05             ` Sitaram Chamarty [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=CAMK1S_gZFxtCwUnzRU3PocB9LcewZ-f5RyraCebJdaBASODaPg@mail.gmail.com \
    --to=sitaramc@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pangyanhan@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).