threads / bug / 31663

[BUG] misplaced space in word diff

Subject: [BUG] misplaced space in word diff

## tl;dr

One message between Sep 27, 2012 and Sep 27, 2012.

replies: 0people: 1as markdown or json

Yann Dirson· Sep 27, 2012, 18:15 UTC · lore

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:

← back to recent threads