Re: [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:07

Sitaram Chamarty [off-list ref] writes:
quoted
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.

Re: [PATCH/RFC 0/2] Teach receive-pack not to run update hook for corrupt/non existent ref

From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:52:07

On Tue, Sep 27, 2011 at 5:19 AM, Junio C Hamano [off-list ref] wrote:
Sitaram Chamarty [off-list ref] writes:
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help