git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Documentation of post-receive hook

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2017, 01:17 UTC
Message-ID
<xmqq1sktoiih.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1511112703.8109.5.camel@gmail.com>
Christoph Michelbach <michelbach94@gmail.com> writes:
Show 11 quoted lines
> 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.
Previous: Christoph MichelbachNext: Christoph Michelbach
Message 7 of 11 in “Documentation of post-receive hook”
  1. Christoph MichelbachNov 16, 2017
  2. Junio C HamanoNov 17, 2017
  3. Junio C HamanoNov 17, 2017
  4. Christoph MichelbachNov 19, 2017
  5. Robert P. J. DayNov 19, 2017
  6. Christoph MichelbachNov 19, 2017
  7. Junio C HamanoNov 20, 2017
  8. Christoph MichelbachNov 21, 2017
  9. Junio C HamanoNov 22, 2017
  10. Christoph MichelbachNov 22, 2017
  11. Re*: Documentation of post-receive hookJunio C Hamano, Nov 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.