aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-p4.txt
diff options
context:
space:
mode:
authorChen Bin <chenbin.sh@gmail.com>2018-07-27 21:22:22 +1000
committerJunio C Hamano <gitster@pobox.com>2018-08-01 13:37:18 -0700
commit251c8c501faf7a7910edb7c9e19692988dcac6a8 (patch)
treeabdf73ddbb55bae86391f683b7a9eeb2a6c9b4db /Documentation/git-p4.txt
parentffc6fa0e396238de3a30623912980263b4f283ab (diff)
downloadgit-251c8c501faf7a7910edb7c9e19692988dcac6a8.tar.gz
git-p4: add the `p4-pre-submit` hook
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> Reviewed-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-p4.txt')
-rw-r--r--Documentation/git-p4.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index f0de3b891b..41780a5aa9 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -374,6 +374,14 @@ These options can be used to modify 'git p4 submit' behavior.
been submitted. Implies --disable-rebase. Can also be set with
git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible.
+Hook for submit
+~~~~~~~~~~~~~~~
+The `p4-pre-submit` hook is executed if it exists and is executable.
+The hook takes no parameters 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.
+
Rebase options
~~~~~~~~~~~~~~
These options can be used to modify 'git p4 rebase' behavior.