summaryrefslogtreecommitdiff
path: root/Documentation/diff-options.txt
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-01-17 17:29:47 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-17 10:44:13 -0800
commitc4b252c3d894673968b144d8e10b79ef22c17b0a (patch)
tree6dd39cdda0f7d8fa06406863509429c328d6a3d0 /Documentation/diff-options.txt
parentbf82940dbf12f066ba42a2a03a5bb626ba22c067 (diff)
downloadgit-c4b252c3d894673968b144d8e10b79ef22c17b0a.tar.gz
color-words: expand docs with precise semantics
Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r--Documentation/diff-options.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 2c1fa4b102..8689a92d8d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -91,12 +91,17 @@ endif::git-format-patch[]
Turn off colored diff, even when the configuration file
gives the default to color output.
---color-words[=regex]::
- Show colored word diff, i.e. color words which have changed.
+--color-words[=<regex>]::
+ Show colored word diff, i.e., color words which have changed.
+ By default, words are separated by whitespace.
+
-Optionally, you can pass a regular expression that tells Git what the
-words are that you are looking for; The default is to interpret any
-stretch of non-whitespace as a word.
+When a <regex> is specified, every non-overlapping match of the
+<regex> is considered a word. Anything between these matches is
+considered whitespace and ignored(!) for the purposes of finding
+differences. You may want to append `|[^[:space:]]` to your regular
+expression to make sure that it matches all non-whitespace characters.
+A match that contains a newline is silently truncated(!) at the
+newline.
--no-renames::
Turn off rename detection, even when the configuration