Re: [PATCH] Clarify pre-push hook documentation

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

 



On Sun, Mar 23, 2014 at 3:01 PM, David Cowden <dcow90@xxxxxxxxx> wrote:
> The documentation as-is does not mention that the pre-push hook is
> executed even when there is nothing to push.  This can lead a new
> reader to beilieve there will always be lines fed to the script's
> standerd input and cause minor confusion as to what is happening

s/standerd/standard/

> when there are no lines provided to the pre-push script.
>
> Signed-off-by: David Cowden <dcow90@xxxxxxxxx>
> ---
>
> Notes:
>     c.f. http://stackoverflow.com/questions/22585091/git-hooks-pre-push-script\
>     -does-not-receive-input-via-stdin
>
>  Documentation/githooks.txt | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> index d954bf6..a28f6f7 100644
> --- a/Documentation/githooks.txt
> +++ b/Documentation/githooks.txt
> @@ -203,6 +203,10 @@ SHA-1>` will be 40 `0`.  If the local commit was specified by something other
>  than a name which could be expanded (such as `HEAD~`, or a SHA-1) it will be
>  supplied as it was originally given.
>
> +The hook is executed regardless of whether there are changes to push or not.
> +In the event that there are no changes, no data will be provided on the
> +script's standard input.
> +
>  If this hook exits with a non-zero status, 'git push' will abort without
>  pushing anything.  Information about why the push is rejected may be sent
>  to the user by writing to standard error.
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]