quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [BUG] 'quilt diff' shows text from wrong file


From: Chris Shoemaker
Subject: [Quilt-dev] [BUG] 'quilt diff' shows text from wrong file
Date: Tue, 3 Oct 2006 14:13:14 -0400
User-agent: Mutt/1.4.1i

First off, I'm a long-time happy quilt user.  Today, I saw something
strange enough that I thought I should report it.  Sorry I don't have
an actual reproduction script.  If it's absolutely required, let me
know.

Here's what happened:

[These first few steps may be unimportant, but I include them just in case.]

I'm in the middle of my patch stack.  The next patch, call it
'sed.diff', is the result of a sed on my tree.

$ quilt push 

[ The push fails because I've made changes to eariler patches.
Instead of forcing it and fixing it up, I'm just going to re-run the
saved sed script. ]

$ quilt delete sed.diff

[ Perhaps I should have used -r here, but I never do. ]

$ quilt new sed.diff

$ quilt add `cat saved-list-of-files`

$ sed -f script.sed -i `quilt files`

Now I want to see what I've done before I `quilt ref`.

$ quilt diff -z |less

Here's where it gets weird, and I had to triple-check that I was
actually seeing what I was seeing.

The diff looked just as I expected, with the right files and hunks and
line numbers, except for one important difference.

Most of the changed lines from the original version (those starting
with '-') were not the actual text from the original version, but the
text from the changed version.

IOW, if my sed script had "s/QQQ/XXX/g" in it, I saw lines like:

@@ -554,7 +554,7 @@



-  foo XXX bar
+  foo XXX bar





And this wasn't just one hunk, but almost every hunk was in the
'correct' place, but showed identical lines.

A little baffled, I decided to `quilt ref` anyway.

Afterward, `quilt diff |less` showed the correct diffs.

Can anyone explain this?  It seems like a bug to me.

-chris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]