git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BUG] misplaced space in word diff

From
YDYann Dirson <ydirson@free.fr>
Date
Sep 27, 2012, 18:15 UTC
Message-ID
<20120927181558.GC6493@home.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:
Message 1 of 1 in “[BUG] misplaced space in word diff”
  1. Yann DirsonSep 27, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.