Re: Documentation of post-receive hook

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

 



Christoph Michelbach <michelbach94@xxxxxxxxx> writes:

> On Fri, 2017-11-17 at 12:24 +0900, Junio C Hamano wrote:
>> So an updated suggestion for the text would be:
>> 
>>      This hook is invoked by 'git-receive-pack' on the remote repository,
>>      which happens when a 'git push' is done on a local repository.
>> 
>> Oh, wait.  That is what we already have ;-).
>
> But this text suggests that the hook is always invoked when a git push to that
> repo is done, which is not the case. How about adding "and updates are reference
> in the remote repository"?

Yeah, I think we are moving in the right direction.  Let's step back
a bit and try not to say "remote repository" twice.  

For that matter, I am not sure if local/remote is adding much value,
to be honest.  It has a certain value to clarify that the receive is
happening on the other end of the push (i.e. not in the repository
you push from), but we do not have to use local/remote for that---
and it is better to avoid 'local', that is relative: if you are in
the mindset of thinking about what happens during a receive, the
repository the receive-pack and the hook operates in is 'local' and
not 'remote' (it is only 'remote' if you think you are the one who
is pushing).

How about this rewrite?  Would it consider all the points raised and
make it easier to understand?

    This hook is invoked by 'git-receive-pack' when it reacts to
    'git push' and updates reference(s) in its repository.



[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