git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation of post-receive hook
@ 2017-11-16 22:40 Christoph Michelbach
  2017-11-17  1:41 ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Michelbach @ 2017-11-16 22:40 UTC (permalink / raw)
  To: git

Hi,

I think the documentation of the post-receive hook is misleading. When reading
it, it appears as though the post-receive hook is executed even when no commits
are transferred by a git push because it isn't mentioned anywhere that this is
necessary for its execution.

This can easily be fixed by changing

    This hook is invoked by 'git-receive-pack' on the remote repository,
    which happens when a 'git push' is done on a local repository.

to:

    This hook is invoked by 'git-receive-pack' on the remote repository,
    which happens when a 'git push' is done on a local repository and
    successfully transfers at least 1 commit.

Alternatively,

    This hook executes once for the receive operation.

can be changed to

    This hook executes once for the receive operation, but only if at least
    1 commit was successfully transferred.

Imho, the first option should be chosen as it informs the reader about this
behavior at the first convenient opportunity.

-- 
Christoph Michelbach <michelbach94@gmail.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-11-24  2:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-16 22:40 Documentation of post-receive hook Christoph Michelbach
2017-11-17  1:41 ` Junio C Hamano
2017-11-17  3:24   ` Junio C Hamano
2017-11-19 17:31     ` Christoph Michelbach
2017-11-19 17:42       ` Robert P. J. Day
2017-11-19 18:55         ` Christoph Michelbach
2017-11-20  1:17       ` Junio C Hamano
2017-11-21 23:44         ` Christoph Michelbach
2017-11-22  1:14           ` Junio C Hamano
2017-11-22 19:09             ` Christoph Michelbach
2017-11-24  2:10             ` Re*: " Junio C Hamano

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).