# [BUG] misplaced space in word diff

1 messages from 2012-09-27 to 2012-09-27. Participants: Yann Dirson.
Thread: https://gitlist.dev/t/31663

## Yann Dirson, 2012-09-27 18:15

Subject: [BUG] misplaced space in word diff
Message-ID: <20120927181558.GC6493@home.lan>
URL: https://gitlist.dev/e/20120927181558.GC6493%40home.lan

```
Here is a quick test case for a word-diff error, using v1.7.10.4
(debian wheezy package).

 Setting up:

tmp$ mkdir foo && cd foo
foo$ git init
Initialized empty Git repository in /tmp/foo/.git/
foo (master)$ echo '*.py    diff=python' > .gitattributes
foo (master)$ echo 'for name in bar.blurb:' > v1.py
foo (master)$ echo 'for name in foo.bar.blurb:' > v2.py

 This looks fine:

foo (master)$ git diff --no-index --word-diff=plain v1.py v2.py
diff --git a/v1.py b/v2.py
index a6a079d..2832331 100644
--- a/v1.py
+++ b/v2.py
@@ -1 +1 @@
for name in {+foo.+}bar.blurb:

 This however is not:

foo (master)$ git diff --no-index --word-diff=plain v2.py v1.py
diff --git a/v2.py b/v1.py
index 2832331..a6a079d 100644
--- a/v2.py
+++ b/v1.py
@@ -1 +1 @@
for name in[-foo.-] bar.blurb:

```
