From: Dave Rolsky Date: Fri, 30 Oct 2009 16:10:10 +0000 (-0500) Subject: Remove obsolete details on how to format a patch. Just point to perlrepository instead. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=168a53cc0d4ae0ff86a6afb90d36aee4047e7db2;p=p5sagit%2Fp5-mst-13.2.git Remove obsolete details on how to format a patch. Just point to perlrepository instead. --- diff --git a/pod/perlhack.pod b/pod/perlhack.pod index b4ff426..abd0933 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1508,6 +1508,10 @@ C is the first active format during a C, (for example, C) then the resulting string should be treated as UTF-8 encoded. +If you are working with a git clone of the Perl repository, you will want to +create a branch for your changes. This will make creating a proper patch much +simpler. See the L for details on how to do this. + How do we prepare to fix this up? First we locate the code in question - the C happens at runtime, so it's going to be in one of the F files. Sure enough, C is in F. Since we're going to be @@ -1647,36 +1651,6 @@ this text in the description of C: pattern with C (or anything else) to force Perl not to UTF-8 encode your string, and then follow this with a C somewhere in your pattern. -All done. Now let's create the patch. F tells us -that if we're making major changes, we should copy the entire directory -to somewhere safe before we begin fiddling, and then do - - diff -ruN old new > patch - -However, we know which files we've changed, and we can simply do this: - - diff -u pp.c~ pp.c > patch - diff -u t/op/pack.t~ t/op/pack.t >> patch - diff -u pod/perlfunc.pod~ pod/perlfunc.pod >> patch - -We end up with a patch looking a little like this: - - --- pp.c~ Fri Jun 02 04:34:10 2000 - +++ pp.c Fri Jun 16 11:37:25 2000 - @@ -4375,6 +4375,7 @@ - register I32 items; - STRLEN fromlen; - register char *pat = SvPVx(*++MARK, fromlen); - + char *patcopy; - register char *patend = pat + fromlen; - register I32 len; - I32 datumtype; - @@ -4405,6 +4406,7 @@ - ... - -And finally, we submit it, with our rationale, to perl5-porters. Job -done! - =head2 Patching a core module This works just like patching anything else, with an extra