summaryrefslogtreecommitdiff
path: root/Documentation/diff-options.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-25 17:13:29 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-25 17:13:29 -0800
commit9847a524321afbfa6dbb08bfd9b6a0746f965578 (patch)
tree4bceeb48691dab9f86b63b02c7001eb5119716d5 /Documentation/diff-options.txt
parentd64d4835b83669d5c9c8ce1989859efa803874db (diff)
parentae3b970ac3e21324a95fea75213c2569180d74c6 (diff)
downloadgit-9847a524321afbfa6dbb08bfd9b6a0746f965578.tar.gz
Merge branch 'js/diff-color-words'
* js/diff-color-words: Change the spelling of "wordregex". color-words: Support diff.wordregex config option color-words: make regex configurable via attributes color-words: expand docs with precise semantics color-words: enable REG_NEWLINE to help user color-words: take an optional regular expression describing words color-words: change algorithm to allow for 0-character word boundaries color-words: refactor word splitting and use ALLOC_GROW() Add color_fwrite_lines(), a function coloring each line individually
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r--Documentation/diff-options.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index a8ed23e7f8..813a7b11b9 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -94,8 +94,22 @@ endif::git-format-patch[]
Turn off colored diff, even when the configuration file
gives the default to color output.
---color-words::
- 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.
++
+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.
++
+The regex can also be set via a diff driver or configuration option, see
+linkgit:gitattributes[1] or linkgit:git-config[1]. Giving it explicitly
+overrides any diff driver or configuration setting. Diff drivers
+override configuration settings.
--no-renames::
Turn off rename detection, even when the configuration