diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-09 00:59:06 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-09 00:59:06 +0000 |
commit | 9e52009c4fe79f4b4fa8cc2d466a768202f67e38 (patch) | |
tree | 8fe863eae176151f80a6ad290f5d6be87663ad51 /Porting | |
parent | a1bbaeff0956ef7fd91528fcc11cae8d1a2d2c2f (diff) | |
download | perl-9e52009c4fe79f4b4fa8cc2d466a768202f67e38.tar.gz |
[win32] add examples of diff(1) usage
p4raw-id: //depot/win32/perl@1079
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/patching.pod | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Porting/patching.pod b/Porting/patching.pod index b528ad7080..e3b6188ff7 100644 --- a/Porting/patching.pod +++ b/Porting/patching.pod @@ -67,6 +67,25 @@ Also, if your patch is to the core (rather than to a module) it is better to create it as a context diff as some machines have broken patch utilities that choke on unified diffs. +GNU diff has many desirable features not provided by most vendor-supplied +diffs. Some examples using GNU diff: + + # generate a patch for a newly added file + % diff -u /dev/null new/file + + # generate a patch to remove a file (patch > v2.4 will remove it cleanly) + % diff -u old/goner /dev/null + + # get additions, deletions along with everything else, recursively + % diff -ruN olddir newdir + + # ignore whitespace + % diff -bu a/file b/file + + # show function name in every hunk (safer, more informative) + % diff -u -F '^[_a-zA-Z0-9]+ *(' old/file new/file + + =item Directories Patches should be generated from the source root directory, not from the |