diff options
| author | Kristoffer Haugsbakk <code@khaugsbakk.name> | 2026-02-09 18:34:37 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-09 10:34:05 -0800 |
| commit | b10e0cb1f391a4466f8d7c4b2550a8b89fda3573 (patch) | |
| tree | f9d3c923427ad0642453c8fef12c4e5706b0ed00 | |
| parent | c2f700ac27f8d382acb8d4e49b0f714234604fe4 (diff) | |
| download | git-b10e0cb1f391a4466f8d7c4b2550a8b89fda3573.tar.xz | |
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. acffc5e9 (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>
| -rw-r--r-- | Documentation/git-am.adoc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc index ba05c703fc..403181baa9 100644 --- a/Documentation/git-am.adoc +++ b/Documentation/git-am.adoc @@ -9,7 +9,7 @@ git-am - Apply a series of patches from a mailbox SYNOPSIS -------- [verse] -'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--no-verify] +'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify] [--[no-]3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>] @@ -150,11 +150,14 @@ Valid <action> for the `--whitespace` option are: --interactive:: Run interactively. +--verify:: -n:: --no-verify:: - By default, the pre-applypatch and applypatch-msg hooks are run. - When any of `--no-verify` or `-n` is given, these are bypassed. - See also linkgit:githooks[5]. + Run the `pre-applypatch` and `applypatch-msg` hooks. This is the + default. Skip these hooks with `-n` or `--no-verify`. See also + linkgit:githooks[5]. ++ +Note that `post-applypatch` cannot be skipped. --committer-date-is-author-date:: By default the command records the date from the e-mail @@ -283,6 +286,8 @@ This command can run `applypatch-msg`, `pre-applypatch`, and `post-applypatch` hooks. See linkgit:githooks[5] for more information. +See the `--verify`/`-n`/`--no-verify` options. + CONFIGURATION ------------- |
