Skip to content

Commit 4f83039

Browse files
Christof Krügergitster
authored andcommitted
Documentation: git diff --check respects core.whitespace
Fix documentation on "git diff --check" by adopting the description from "git apply --whitespace". Signed-off-by: Christof Krüger <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a598ded commit 4f83039

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Documentation/diff-options.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,14 @@ endif::git-format-patch[]
194194

195195
ifndef::git-format-patch[]
196196
--check::
197-
Warn if changes introduce trailing whitespace
198-
or an indent that uses a space before a tab. Exits with
199-
non-zero status if problems are found. Not compatible with
200-
--exit-code.
197+
Warn if changes introduce whitespace errors. What are
198+
considered whitespace errors is controlled by `core.whitespace`
199+
configuration. By default, trailing whitespaces (including
200+
lines that solely consist of whitespaces) and a space character
201+
that is immediately followed by a tab character inside the
202+
initial indent of the line are considered whitespace errors.
203+
Exits with non-zero status if problems are found. Not compatible
204+
with --exit-code.
201205
endif::git-format-patch[]
202206

203207
--full-index::

0 commit comments

Comments
 (0)