gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Encoding handling proposal


From: Charles Duffy
Subject: Re: [Gnu-arch-users] Encoding handling proposal
Date: Mon, 30 Aug 2004 16:24:01 -0500

On Sun, 2004-08-29 at 17:29, Marcus Sundman wrote:
> On Monday 30 August 2004 01:09, Charles Duffy wrote:
> > Hmm -- being able to view the difference between two files in a way
> > sensitive to their type without being able to apply those changes in a
> > way sensitive to the file type seems like rather a waste.
> 
> Yes, but that doesn't mean the patch file format has to be different, just 
> that it has to be flexible enough to accomodate a wide range of situations. 
> E.g. a diff tool for java source code might notice that a 20 line method 
> you moved hasn't changed at all, so it might write a patch file saying that 
> the corresponding byte range is moved to another offset. A generic text 
> diff tool on the other hand might make a patch file saying 20 lines have 
> been removed and 20 new lines have been introduced at another offset. The 
> latter patch file would be a lot larger than the former, but that doesn't 
> mean they would have to have different formats.

Eh?

"Move this byte range from here to here" isn't robust against patching
on inexact input; such a patch would thus be unmergable. Further, the
patch/merge tools we currently backend into don't support such
primitives.

"Move the method with *this* name to be above the method with *this*
name" is more robust, and could be applied (or rejected with an
intelligent explanation about why it won't apply) -- but doing it means
a file-format-aware diff/patch tool pair.





reply via email to

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