Skip to content

Commit 45072ee

Browse files
committed
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>"
2 parents a2082db + a171dac commit 45072ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Documentation/git-am.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ include::rerere-options.txt[]
128128
These flags are passed to the 'git apply' (see linkgit:git-apply[1])
129129
program that applies
130130
the patch.
131+
+
132+
Valid <action> for the `--whitespace` option are:
133+
`nowarn`, `warn`, `fix`, `error`, and `error-all`.
131134

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

apply.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ static int parse_whitespace_option(struct apply_state *state, const char *option
7777
return 0;
7878
}
7979
/*
80-
* Please update $__git_whitespacelist in git-completion.bash
80+
* Please update $__git_whitespacelist in git-completion.bash,
81+
* Documentation/git-apply.txt, and Documentation/git-am.txt
8182
* when you add new options.
8283
*/
8384
return error(_("unrecognized whitespace option '%s'"), option);

0 commit comments

Comments
 (0)