Merge branch 'jc/am-whitespace-doc'

"git am --help" now tells readers what actions are available in
"git am --whitespace=<action>", in addition to saying that the
option is passed through to the underlying "git apply".

* jc/am-whitespace-doc:
  doc: add shortcut to "am --whitespace=<action>"
maint
Junio C Hamano 2024-02-27 16:04:31 -08:00
commit 45072eefef
2 changed files with 5 additions and 1 deletions

View File

@ -128,6 +128,9 @@ include::rerere-options.txt[]
These flags are passed to the 'git apply' (see linkgit:git-apply[1]) These flags are passed to the 'git apply' (see linkgit:git-apply[1])
program that applies program that applies
the patch. the patch.
+
Valid <action> for the `--whitespace` option are:
`nowarn`, `warn`, `fix`, `error`, and `error-all`.


--patch-format:: --patch-format::
By default the command will try to detect the patch format By default the command will try to detect the patch format

View File

@ -77,7 +77,8 @@ static int parse_whitespace_option(struct apply_state *state, const char *option
return 0; return 0;
} }
/* /*
* Please update $__git_whitespacelist in git-completion.bash * Please update $__git_whitespacelist in git-completion.bash,
* Documentation/git-apply.txt, and Documentation/git-am.txt
* when you add new options. * when you add new options.
*/ */
return error(_("unrecognized whitespace option '%s'"), option); return error(_("unrecognized whitespace option '%s'"), option);