Skip to content

Commit 15b07cb

Browse files
committed
Merge branch 'pw/diff-color-moved-ws-fix'
"git diff --color-moved-ws" updates. * pw/diff-color-moved-ws-fix: diff --color-moved-ws: handle blank lines diff --color-moved-ws: modify allow-indentation-change diff --color-moved-ws: optimize allow-indentation-change diff --color-moved=zebra: be stricter with color alternation diff --color-moved-ws: fix false positives diff --color-moved-ws: demonstrate false positives diff: allow --no-color-moved-ws Use "whitespace" consistently diff: document --no-color-moved
2 parents 27dc9eb + 0cd51e9 commit 15b07cb

File tree

4 files changed

+256
-87
lines changed

4 files changed

+256
-87
lines changed

Documentation/diff-options.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,21 @@ dimmed-zebra::
293293
`dimmed_zebra` is a deprecated synonym.
294294
--
295295

296+
--no-color-moved::
297+
Turn off move detection. This can be used to override configuration
298+
settings. It is the same as `--color-moved=no`.
299+
296300
--color-moved-ws=<modes>::
297-
This configures how white spaces are ignored when performing the
301+
This configures how whitespace is ignored when performing the
298302
move detection for `--color-moved`.
299303
ifdef::git-diff[]
300304
It can be set by the `diff.colorMovedWS` configuration setting.
301305
endif::git-diff[]
302306
These modes can be given as a comma separated list:
303307
+
304308
--
309+
no::
310+
Do not ignore whitespace when performing move detection.
305311
ignore-space-at-eol::
306312
Ignore changes in whitespace at EOL.
307313
ignore-space-change::
@@ -312,12 +318,17 @@ ignore-all-space::
312318
Ignore whitespace when comparing lines. This ignores differences
313319
even if one line has whitespace where the other line has none.
314320
allow-indentation-change::
315-
Initially ignore any white spaces in the move detection, then
321+
Initially ignore any whitespace in the move detection, then
316322
group the moved code blocks only into a block if the change in
317323
whitespace is the same per line. This is incompatible with the
318324
other modes.
319325
--
320326

327+
--no-color-moved-ws::
328+
Do not ignore whitespace when performing move detection. This can be
329+
used to override configuration settings. It is the same as
330+
`--color-moved-ws=no`.
331+
321332
--word-diff[=<mode>]::
322333
Show a word diff, using the <mode> to delimit changed words.
323334
By default, words are delimited by whitespace; see

Documentation/git-cat-file.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ In the second form, a list of objects (separated by linefeeds) is provided on
2323
stdin, and the SHA-1, type, and size of each object is printed on stdout. The
2424
output format can be overridden using the optional `<format>` argument. If
2525
either `--textconv` or `--filters` was specified, the input is expected to
26-
list the object names followed by the path name, separated by a single white
27-
space, so that the appropriate drivers can be determined.
26+
list the object names followed by the path name, separated by a single
27+
whitespace, so that the appropriate drivers can be determined.
2828

2929
OPTIONS
3030
-------
@@ -79,15 +79,15 @@ OPTIONS
7979
Print object information and contents for each object provided
8080
on stdin. May not be combined with any other options or arguments
8181
except `--textconv` or `--filters`, in which case the input lines
82-
also need to specify the path, separated by white space. See the
82+
also need to specify the path, separated by whitespace. See the
8383
section `BATCH OUTPUT` below for details.
8484

8585
--batch-check::
8686
--batch-check=<format>::
8787
Print object information for each object provided on stdin. May
8888
not be combined with any other options or arguments except
8989
`--textconv` or `--filters`, in which case the input lines also
90-
need to specify the path, separated by white space. See the
90+
need to specify the path, separated by whitespace. See the
9191
section `BATCH OUTPUT` below for details.
9292

9393
--batch-all-objects::

0 commit comments

Comments
 (0)