Skip to content

Commit b10e0cb

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: am: fill out hook discussion
Document `--verify` and rephrase the `--[no-]verify` section to lead with the default, in imperative mood.[1] Historically it makes sense that only the negated forms are documented; they are all run by default and thus you only need to use hook options if you want to turn some of them off. But, beyond just desiring uniform documentation,[2] it’s very much possible to have, say, a Git alias with `--no-verify` that you might sometimes want to turn back on with the *positive* form. Also mention the options in the “Hooks” section and mention that `post-applypatch` cannot be skipped. † 1: See e.g. acffc5e (doc: convert git-remote to synopsis style, 2025-12-20) † 2: https://lore.kernel.org/git/xmqqcyct1mtq.fsf@gitster.g/ Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c2f700a commit b10e0cb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Documentation/git-am.adoc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-am - Apply a series of patches from a mailbox
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--no-verify]
12+
'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
1313
[--[no-]3way] [--interactive] [--committer-date-is-author-date]
1414
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
1515
[--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]
@@ -150,11 +150,14 @@ Valid <action> for the `--whitespace` option are:
150150
--interactive::
151151
Run interactively.
152152

153+
--verify::
153154
-n::
154155
--no-verify::
155-
By default, the pre-applypatch and applypatch-msg hooks are run.
156-
When any of `--no-verify` or `-n` is given, these are bypassed.
157-
See also linkgit:githooks[5].
156+
Run the `pre-applypatch` and `applypatch-msg` hooks. This is the
157+
default. Skip these hooks with `-n` or `--no-verify`. See also
158+
linkgit:githooks[5].
159+
+
160+
Note that `post-applypatch` cannot be skipped.
158161

159162
--committer-date-is-author-date::
160163
By default the command records the date from the e-mail
@@ -283,6 +286,8 @@ This command can run `applypatch-msg`, `pre-applypatch`,
283286
and `post-applypatch` hooks. See linkgit:githooks[5] for more
284287
information.
285288

289+
See the `--verify`/`-n`/`--no-verify` options.
290+
286291
CONFIGURATION
287292
-------------
288293

0 commit comments

Comments
 (0)