Change the spelling of "wordregex".
Use "wordRegex" for configuration variable names. Use "word_regex" for C language tokens. Signed-off-by: Boyd Stephen Smith Jr. <bss@iguanasuicide.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Boyd Stephen Smith Jr committed
Jan 20, 2009 at 22:59 UTC
ae3b970ac3e21324a95fea75213c2569180d74c6
4 files changed
+9
-9
Documentation/config.txt
+1
-1
@@ -639,7 +639,7 @@ diff.suppress-blank-empty::
639
A boolean to inhibit the standard behavior of printing a space
640
before each empty output line. Defaults to false.
641
642
-diff.wordregex::
642
+diff.wordRegex::
643
A POSIX Extended Regular Expression used to determine what is a "word"
644
when performing word-by-word difference calculations. Character
645
sequences that match the regular expression are "words", all other
Documentation/gitattributes.txt
+2
-2
@@ -341,14 +341,14 @@ Customizing word diff
341
342
You can customize the rules that `git diff --color-words` uses to
343
split words in a line, by specifying an appropriate regular expression
344
-in the "diff.*.wordregex" configuration variable. For example, in TeX
344
+in the "diff.*.wordRegex" configuration variable. For example, in TeX
345
a backslash followed by a sequence of letters forms a command, but
346
several such commands can be run together without intervening
347
whitespace. To separate them, use a regular expression such as
348
349
------------------------
350
[diff "tex"]
351
- wordregex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+"
351
+ wordRegex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+"
352
------------------------
353
354
A built-in pattern is provided for all languages listed in the
t/t4034-diff-words.sh
+4
-4
@@ -86,7 +86,7 @@ test_expect_success 'word diff with a regular expression' '
86
'
87
88
test_expect_success 'set a diff driver' '
89
- git config diff.testdriver.wordregex "[^[:space:]]" &&
89
+ git config diff.testdriver.wordRegex "[^[:space:]]" &&
90
cat <<EOF > .gitattributes
91
pre diff=testdriver
92
post diff=testdriver
@@ -121,8 +121,8 @@ test_expect_success 'use regex supplied by driver' '
121
122
'
123
124
-test_expect_success 'set diff.wordregex option' '
125
- git config diff.wordregex "[[:alnum:]]+"
124
+test_expect_success 'set diff.wordRegex option' '
125
+ git config diff.wordRegex "[[:alnum:]]+"
126
'
127
128
cp expect.letter-runs-are-words expect
@@ -138,7 +138,7 @@ test_expect_success '.gitattributes override config' '
138
'
139
140
test_expect_success 'remove diff driver regex' '
141
- git config --unset diff.testdriver.wordregex
141
+ git config --unset diff.testdriver.wordRegex
142
'
143
144
cat > expect <<\EOF
userdiff.c
+2
-2
@@ -6,8 +6,8 @@ static struct userdiff_driver *drivers;
6
static int ndrivers;
7
static int drivers_alloc;
8
9
-#define PATTERNS(name, pattern, wordregex) \
10
- { name, NULL, -1, { pattern, REG_EXTENDED }, wordregex }
9
+#define PATTERNS(name, pattern, word_regex) \
10
+ { name, NULL, -1, { pattern, REG_EXTENDED }, word_regex }
11
static struct userdiff_driver builtin_drivers[] = {
12
PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
13
"[^<>= \t]+|[^[:space:]]|[\x80-\xff]+"),