From: Eric Sunshine <sunshine@sunshineco.com>
To: bin chen <chenbin.sh@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 1/1] Add the `p4-pre-submit` hook
Date: Fri, 27 Jul 2018 14:15:21 -0400 [thread overview]
Message-ID: <CAPig+cSOQHV-F9GfB+73VAY-jyFdBSU93kdLa9jiRqLUvPoJ4w@mail.gmail.com> (raw)
In-Reply-To: <20180727112222.19061-1-chenbin.sh@gmail.com>
On Fri, Jul 27, 2018 at 7:22 AM Chen Bin <chenbin.sh@gmail.com> 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@gmail.com>
> ---
> 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."""
next prev parent reply other threads:[~2018-07-27 18:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 11:27 [PATCH 1/1] add hook pre-p4-submit Chen Bin
2018-07-25 8:37 ` Luke Diamand
2018-07-25 9:14 ` Ævar Arnfjörð Bjarmason
2018-07-25 11:10 ` chen bin
2018-07-25 13:43 ` Chen Bin
2018-07-25 20:00 ` Eric Sunshine
2018-07-25 20:21 ` Junio C Hamano
2018-07-26 2:08 ` chen bin
2018-07-26 9:21 ` Eric Sunshine
2018-07-26 21:09 ` Luke Diamand
2018-07-27 1:31 ` chen bin
2018-07-26 13:41 ` Chen Bin
2018-07-26 16:49 ` Junio C Hamano
2018-07-26 21:20 ` Eric Sunshine
2018-07-27 11:22 ` [PATCH 1/1] Add the `p4-pre-submit` hook Chen Bin
2018-07-27 18:15 ` Eric Sunshine [this message]
2018-07-30 18:07 ` Junio C Hamano
2018-07-30 18:48 ` Luke Diamand
2018-07-30 21:01 ` Junio C Hamano
2018-07-31 8:46 ` SZEDER Gábor
2018-07-31 13:40 ` Luke Diamand
2018-07-31 14:40 ` Junio C Hamano
2018-07-31 19:54 ` Luke Diamand
2018-08-01 14:57 ` chen bin
2018-08-01 15:10 ` Junio C Hamano
2018-08-01 15:54 ` Chen Bin
2018-08-01 17:41 ` 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=CAPig+cSOQHV-F9GfB+73VAY-jyFdBSU93kdLa9jiRqLUvPoJ4w@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=chenbin.sh@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 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).