Merge branch 'ab/config-based-hooks-2'
More "config-based hooks". * ab/config-based-hooks-2: run-command: remove old run_hook_{le,ve}() hook API receive-pack: convert push-to-checkout hook to hook.h read-cache: convert post-index-change to use hook.h commit: convert {pre-commit,prepare-commit-msg} hook to hook.h git-p4: use 'git hook' to run hooks send-email: use 'git hook run' for 'sendemail-validate' git hook run: add an --ignore-missing flag hooks: convert worktree 'post-checkout' hook to hook library hooks: convert non-worktree 'post-checkout' hook to hook library merge: convert post-merge to use hook.h am: convert applypatch-msg to use hook.h rebase: convert pre-rebase to use hook.h hook API: add a run_hooks_l() wrapper am: convert {pre,post}-applypatch to use hook.h gc: use hook library for pre-auto-gc hook hook API: add a run_hooks() wrapper hook: add 'run' subcommand
This commit is contained in:
45
Documentation/git-hook.txt
Normal file
45
Documentation/git-hook.txt
Normal file
@ -0,0 +1,45 @@
|
||||
git-hook(1)
|
||||
===========
|
||||
|
||||
NAME
|
||||
----
|
||||
git-hook - Run git hooks
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git hook' run [--ignore-missing] <hook-name> [-- <hook-args>]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
A command interface to running git hooks (see linkgit:githooks[5]),
|
||||
for use by other scripted git commands.
|
||||
|
||||
SUBCOMMANDS
|
||||
-----------
|
||||
|
||||
run::
|
||||
Run the `<hook-name>` hook. See linkgit:githooks[5] for
|
||||
supported hook names.
|
||||
+
|
||||
|
||||
Any positional arguments to the hook should be passed after a
|
||||
mandatory `--` (or `--end-of-options`, see linkgit:gitcli[7]). See
|
||||
linkgit:githooks[5] for arguments hooks might expect (if any).
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
--ignore-missing::
|
||||
Ignore any missing hook by quietly returning zero. Used for
|
||||
tools that want to do a blind one-shot run of a hook that may
|
||||
or may not be present.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
linkgit:githooks[5]
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
@ -698,6 +698,10 @@ and "0" meaning they were not.
|
||||
Only one parameter should be set to "1" when the hook runs. The hook
|
||||
running passing "1", "1" should not be possible.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
linkgit:git-hook[1]
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the linkgit:git[1] suite
|
||||
|
Reference in New Issue
Block a user