All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Michelbach <michelbach94@gmail.com>
To: git@vger.kernel.org
Subject: Documentation of post-receive hook
Date: Thu, 16 Nov 2017 23:40:31 +0100	[thread overview]
Message-ID: <1510872031.23230.7.camel@gmail.com> (raw)

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>

             reply	other threads:[~2017-11-16 22:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 22:40 Christoph Michelbach [this message]
2017-11-17  1:41 ` Documentation of post-receive hook 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510872031.23230.7.camel@gmail.com \
    --to=michelbach94@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.