Re: [PATCH 1/1] Add the `p4-pre-submit` hook

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

 



On Fri, Jul 27, 2018 at 7:22 AM Chen Bin <chenbin.sh@xxxxxxxxx> wrote:
> The `p4-pre-submit` hook is executed before git-p4 submits code.
> If the hook exits with non-zero value, submit process not start.
>
> Signed-off-by: Chen Bin <chenbin.sh@xxxxxxxxx>
> ---
> diff --git a/git-p4.py b/git-p4.py
> @@ -1494,7 +1494,13 @@ def __init__(self):
> -        self.description = "Submit changes from git to the perforce depot."
> +        self.description = """Submit changes from git to the perforce depot.\n

It seemed odd to have an explicit \n within a """...""" string as
opposed to simply using a blank line, but I see there is existing
precedence in git-p4.py when setting (at least one) self.description.
Okay.

> +    The `p4-pre-submit` hook is executed if it exists and is executable.
> +    The hook takes no parameter and nothing from standard input. Exiting with
> +    non-zero status from this script prevents `git-p4 submit` from launching.
> +
> +    One usage scenario is to run unit tests in the hook."""



[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