Re: diff display



Ron Johnson wrote:
On 09/10/08 18:28, gary turner wrote:
Ron Johnson wrote:
On 09/10/08 16:03, Kamaraju S Kusumanchi wrote:
<snip>
The main purpose of diff is to generate a patch which can then be used to
apply/revert changes across two versions of a file.

That would sanely be called "patch", not "diff".

See man patch. diff consists of differences between files, and patch folds those differences back into the original.

Then that should be:

$ patch --gen-diff

$ patch --apply-diff

There is a measure of logic there. Having both is in line with the philosophy of "do one thing, do it well". There are a number of uses for diff where folding back into the original is not a part of the deal—thus, no patch.

cheers,

gary
--
Anyone can make a usable web site. It takes a graphic
designer to make it slow, confusing and painful to use.
begin:vcard
fn:Gary Turner
n:Turner;Gary
org:Gary Turner, Web Developer
adr:;;;;;;USA
email;internet:gary.kk5st@xxxxxxxxx
title:Czar
x-mozilla-html:FALSE
url:http://gtwebdev.com/
version:2.1
end:vcard



Relevant Pages

  • Success! was Re: tvtime audio vs pcHDTV-3000 card and pvHDTV-1.6 software
    ... On Wednesday 16 March 2005 20:15, Gene Heskett wrote: ... > that a diff actually outputs only the src code differences, ... nor in that simple little 10 line patch that ... >Unforch, the 2.6.11 plain tree has not, in this case been built yet ...
    (Linux-Kernel)
  • Re: how to compile and install a new driver
    ... Warren Block wrote: ... but you'd better include enough info so that they could make FreeBSD-stype diffs: diff has the unfortunate default of making an output that is compatible with ed. ... This supplies extremely little information to use, in case the file you're trying to patch with that diff has changed, and is also damned hard for mere humans to understand. ... then you can compile. ...
    (freebsd-questions)
  • [PATCH][CFT] mm swapping improvements
    ... Nikita's patches and one of my own, and backs out the RSS limit patch ... diff -puN include/linux/mmzone.h~rollup include/linux/mmzone.h ... -int FASTCALL); ...
    (Linux-Kernel)
  • Re: Regression from 2.6.26: Hibernation (possibly suspend) broken on Toshiba R500 (bisected)
    ... Attached is a full diff between dmesg from -rc3 and -rc6 with your debug ... running with the debug patch). ...
    (Linux-Kernel)
  • Re: Reading and applying patches
    ... It's worth mentioning that patch is pretty forgiving. ... text up to the actual patch data (the output of a diff command, ... often the "old" tree will be inside ... Commands like "cvs diff" will generate diff output, ...
    (Fedora)