Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-16 01:08:27 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-16 01:08:27 +0300
commitdd4ab3eaaa46e896ccbada61799f825011601cb0 (patch)
tree8099fbdfa0ecd8c3430441fbb671e7cd6882410c /Documentation
parent30cf1911e2119eda55d9376c9cc2eda893fe6692 (diff)
parent251c8c501faf7a7910edb7c9e19692988dcac6a8 (diff)
Merge branch 'cb/p4-pre-submit-hook'
"git p4 submit" learns to ask its own pre-submit hook if it should continue with submitting. * cb/p4-pre-submit-hook: git-p4: add the `p4-pre-submit` hook
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-p4.txt8
-rw-r--r--Documentation/githooks.txt7
2 files changed, 15 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.
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index e3c283a174..959044347e 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -485,6 +485,13 @@ The exit status determines whether git will use the data from the
hook to limit its search. On error, it will fall back to verifying
all files and folders.
+p4-pre-submit
+~~~~~~~~~~~~~
+
+This hook is invoked by `git-p4 submit`. It takes no parameters and nothing
+from standard input. Exiting with non-zero status from this script prevent
+`git-p4 submit` from launching. Run `git-p4 submit --help` for details.
+
GIT
---
Part of the linkgit:git[1] suite