summaryrefslogtreecommitdiff
path: root/t/t4034-diff-words.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2012-03-14 19:24:09 +0100
committerJunio C Hamano <gitster@pobox.com>2012-03-14 14:41:20 -0700
commit6440d3417c1d51a20014d4b6fc6c59bacfa87dab (patch)
tree9f8622f346cea445bf7a2840980c3a82f761dd06 /t/t4034-diff-words.sh
parent77d1a520fb5b8ad8cc86228023f16a44b75c05d1 (diff)
downloadgit-6440d3417c1d51a20014d4b6fc6c59bacfa87dab.tar.gz
diff: tweak a _copy_ of diff_options with word-difftr/maint-word-diff-regex-sticky
When using word diff, the code sets the word_regex from various defaults if it was not set already. The problem is that it does this on the original diff_options, which will also be used in subsequent diffs. This means that when the word_regex is not given on the command line, only the first diff for which a setting for word_regex (either from attributes or diff.wordRegex) ever takes effect. This value then propagates to the rest of the diff runs and in particular prevents further attribute lookups. Fix the problem of changing diff state once and for all, by working with a _copy_ of the diff_options. Noticed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034-diff-words.sh')
-rwxr-xr-xt/t4034-diff-words.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index 310ace1b5d..30d42cb3bf 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -365,7 +365,7 @@ test_expect_success 'setup history with two files' '
git commit -mmodified -a
'
-test_expect_failure 'wordRegex for the first file does not apply to the second' '
+test_expect_success 'wordRegex for the first file does not apply to the second' '
echo "*.tex diff=tex" >.gitattributes &&
git config diff.tex.wordRegex "[a-z]+|." &&
cat >expect <<-\EOF &&