Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-01-17 19:29:45 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-17 21:43:08 +0300
commit2b6a5417d750d086d1da906e46de2b3ad8df6753 (patch)
tree46d5ccf880314ecba51547d89a75304393b3a62d /Documentation/diff-options.txt
parent2e5d2003b28820f88296e47a79eb440ca0295000 (diff)
color-words: take an optional regular expression describing words
In some applications, words are not delimited by white space. To allow for that, you can specify a regular expression describing what makes a word with git diff --color-words='[A-Za-z0-9]+' Note that words cannot contain newline characters. As suggested by Thomas Rast, the words are the exact matches of the regular expression. Note that a regular expression beginning with a '^' will match only a word at the beginning of the hunk, not a word at the beginning of a line, and is probably not what you want. This commit contains a quoting fix by Thomas Rast. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r--Documentation/diff-options.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 43793d7500..2c1fa4b102 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -91,8 +91,12 @@ endif::git-format-patch[]
Turn off colored diff, even when the configuration file
gives the default to color output.
---color-words::
+--color-words[=regex]::
Show colored word diff, i.e. color words which have changed.
++
+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.
--no-renames::
Turn off rename detection, even when the configuration