Re: [PATCH] doc: clarify post-receive hook behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/07/12 04:11PM, Junio C Hamano wrote:
> Justin Tobler <jltobler@xxxxxxxxx> writes:
> 
> > -This hook executes once for the receive operation.  
> > +For a receive operation, this hook executes a single time at most.  
> 
> Hmph, maybe we can strike this sentence as we already said "once" in
> the previous paragraph.  The intention of the original description
> that said "only after" was to convey two things:

Ya, I competely agree that this is repetetive and should be removed. 

> 
>  (1) it runs only once, and
>  (2) it does not run before all the ref-update requests have been
>      processed (either successfully or unsuccessfully).  
> 
> If the "only after" was not serving the original purpose of
> conveying both of the two, then perhaps we should remove the word
> "once" from the previous paragraph instead and keep this sentence.
> 
> My preference is revert your "once after" -> "once if" to get back
> to the original "once after", and then remove "this hook executes
> once for the receive operaiton" of the original, without adding your
> "For a receieve ... at most".
> 
>     The hook executes on the remote repository once after all the
>     proposed ref updates are processed and if at least one ref is
>     updated as the result.
> 

Thanks for the suggestion. This more clearly conveys the two points
mentioned. Will add in V2.

> > -It takes no
> > -arguments, but gets the same information as the
> > -<<pre-receive,'pre-receive'>>
> > -hook does on its standard input.
> > -It
> > +takes no arguments, but for each ref successfully updated, it receives a
> > +line on standard input that follows the same format as the
> > +<<pre-receive,'pre-receive'>> hook.
> 
> This part of the update is great.  The "but" there is annoying, but
> that badness was inherited from the original and not a fault of this
> patch.  If I were writing it from scratch I would probably have said
> something like:
> 
>     The hook takes no arguments.  It receives one line on standard
>     input for each ref that is successfully updated in the same
>     format as the pre-receive hook.
> 

I also agree that it is better to break out these two statements. Will
adapt this for V2. Thanks again.

-Justin




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux