@@ -13,7 +13,7 @@ SYNOPSIS
1313 [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse]
1414 [--allow-binary-replacement | --binary] [--reject] [-z]
1515 [-pNUM] [-CNUM] [--inaccurate-eof] [--cached]
16- [--whitespace=<nowarn|warn|error|error-all|strip >]
16+ [--whitespace=<nowarn|warn|fix| error|error-all>]
1717 [--exclude=PATH] [--verbose] [<patch>...]
1818
1919DESCRIPTION
@@ -135,25 +135,32 @@ discouraged.
135135 be useful when importing patchsets, where you want to exclude certain
136136 files or directories.
137137
138- --whitespace=<option>::
139- When applying a patch, detect a new or modified line
140- that ends with trailing whitespaces (this includes a
141- line that solely consists of whitespaces). By default,
142- the command outputs warning messages and applies the
143- patch.
144- When gitlink:git-apply[1] is used for statistics and not applying a
145- patch, it defaults to `nowarn`.
146- You can use different `<option>` to control this
147- behavior:
138+ --whitespace=<action>::
139+ When applying a patch, detect a new or modified line that has
140+ whitespace errors. What are considered whitespace errors is
141+ controlled by `core.whitespace` configuration. By default,
142+ trailing whitespaces (including lines that solely consist of
143+ whitespaces) and a space character that is immediately followed
144+ by a tab character inside the initial indent of the line are
145+ considered whitespace errors.
146+ +
147+ By default, the command outputs warning messages but applies the patch.
148+ When gitlink:git-apply[1] is used for statistics and not applying a
149+ patch, it defaults to `nowarn`.
150+ +
151+ You can use different `<action>` to control this
152+ behavior:
148153+
149154* `nowarn` turns off the trailing whitespace warning.
150155* `warn` outputs warnings for a few such errors, but applies the
151- patch (default).
156+ patch as-is (default).
157+ * `fix` outputs warnings for a few such errors, and applies the
158+ patch after fixing them (`strip` is a synonym --- the tool
159+ used to consider only trailing whitespaces as errors, and the
160+ fix involved 'stripping' them, but modern gits do more).
152161* `error` outputs warnings for a few such errors, and refuses
153162 to apply the patch.
154163* `error-all` is similar to `error` but shows all errors.
155- * `strip` outputs warnings for a few such errors, strips out the
156- trailing whitespaces and applies the patch.
157164
158165--inaccurate-eof::
159166 Under certain circumstances, some versions of diff do not correctly
0 commit comments