Skip to content

Commit ae3b970

Browse files
stephen-smithgitster
authored andcommitted
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. <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98a4d87 commit ae3b970

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ diff.suppress-blank-empty::
639639
A boolean to inhibit the standard behavior of printing a space
640640
before each empty output line. Defaults to false.
641641

642-
diff.wordregex::
642+
diff.wordRegex::
643643
A POSIX Extended Regular Expression used to determine what is a "word"
644644
when performing word-by-word difference calculations. Character
645645
sequences that match the regular expression are "words", all other

Documentation/gitattributes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,14 @@ Customizing word diff
341341

342342
You can customize the rules that `git diff --color-words` uses to
343343
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
345345
a backslash followed by a sequence of letters forms a command, but
346346
several such commands can be run together without intervening
347347
whitespace. To separate them, use a regular expression such as
348348

349349
------------------------
350350
[diff "tex"]
351-
wordregex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+"
351+
wordRegex = "\\\\[a-zA-Z]+|[{}]|\\\\.|[^\\{}[:space:]]+"
352352
------------------------
353353

354354
A built-in pattern is provided for all languages listed in the

t/t4034-diff-words.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ test_expect_success 'word diff with a regular expression' '
8686
'
8787

8888
test_expect_success 'set a diff driver' '
89-
git config diff.testdriver.wordregex "[^[:space:]]" &&
89+
git config diff.testdriver.wordRegex "[^[:space:]]" &&
9090
cat <<EOF > .gitattributes
9191
pre diff=testdriver
9292
post diff=testdriver
@@ -121,8 +121,8 @@ test_expect_success 'use regex supplied by driver' '
121121
122122
'
123123

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:]]+"
126126
'
127127

128128
cp expect.letter-runs-are-words expect
@@ -138,7 +138,7 @@ test_expect_success '.gitattributes override config' '
138138
'
139139

140140
test_expect_success 'remove diff driver regex' '
141-
git config --unset diff.testdriver.wordregex
141+
git config --unset diff.testdriver.wordRegex
142142
'
143143

144144
cat > expect <<\EOF

userdiff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ static struct userdiff_driver *drivers;
66
static int ndrivers;
77
static int drivers_alloc;
88

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 }
1111
static struct userdiff_driver builtin_drivers[] = {
1212
PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
1313
"[^<>= \t]+|[^[:space:]]|[\x80-\xff]+"),

0 commit comments

Comments
 (0)