public inbox for patchutils-list@sourceware.org
 help / color / mirror / Atom feed
From: Tim Waugh <twaugh@redhat.com>
To: Eli Carter <eli.carter@commprove.com>
Cc: patchutils-list@sourceware.org
Subject: Re: patch subtraction bug
Date: Tue, 24 Oct 2006 11:08:00 -0000	[thread overview]
Message-ID: <1161688100.4287.5.camel@cyberelk.elk> (raw)
In-Reply-To: <53689.10.6.7.70.1161642393.squirrel@mail.ie.commprove.com>

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

On Mon, 2006-10-23 at 17:26 -0500, Eli Carter wrote:
> I tried abusing patchutils in a new way today, and it didn't do what I
> wanted.
> 
> First, pull one change out of a larger patch:
> filterdiff -p1 -i some/file.py --hunks=5 < diff > one-change.patch
> Now, I want to remove that change from the larger patch, so I combine the
> larger patch with a reversed version of the the one-change.patch:
> interdiff one-change.patch /dev/null | combinediff diff /dev/stdin >
> rest.patch
> 
> What I got was a patch with the hunk from one-change.patch in rest.patch
> twice with different line numbers for the change.

Hmm, I just tried this myself and got the expected results -- the entire
original patch with the single change removed.

Sounds like it depends on the input you give it.  One thing that *might*
account for it is described in the 'BUGS' section of the interdiff man
page:

  There are some sets of patches in which there is just not enough
  information to produce a proper interdiff. In this case, the strategy
  employed is to revert the original patch and apply the new patch.
  This, unfortunately, means that interdiffs are not guaranteed to be
  reversible.

Do you think it could be that?

Tim.
*/


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-10-24 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-23 22:26 Eli Carter
2006-10-24 11:08 ` Tim Waugh [this message]
2006-10-24 14:37   ` Eli Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1161688100.4287.5.camel@cyberelk.elk \
    --to=twaugh@redhat.com \
    --cc=eli.carter@commprove.com \
    --cc=patchutils-list@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).