This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Multiple commits in Super Quick Patch Guide
[perl5.git] / pod / perlhack.pod
index 55fca65..da9d0a3 100644 (file)
@@ -29,6 +29,13 @@ with the following command:
 
   % git clone git://perl5.git.perl.org/perl.git perl
 
 
   % git clone git://perl5.git.perl.org/perl.git perl
 
+=item * Ensure you're following the latest advice
+
+In case the advice in this guide has been updated recently, read the
+latest version directly from the perl source:
+
+  % perldoc pod/perlhack.pod
+
 =item * Make your change
 
 Hack, hack, hack.
 =item * Make your change
 
 Hack, hack, hack.
@@ -60,18 +67,47 @@ Assuming your patch consists of a single git commit, the following
 writes the file as a MIME attachment, and sends it with a meaningful
 subject:
 
 writes the file as a MIME attachment, and sends it with a meaningful
 subject:
 
- % git format-patch -1 --attach
- % perlbug -s "[PATCH] $(git log -1 --oneline HEAD)" -f 0001-*.patch
+  % git format-patch -1 --attach
+  % ./perl -Ilib utils/perlbug -s "[PATCH] $(
+        git log -1 --oneline HEAD)" -f 0001-*.patch
 
 The perlbug program will ask you a few questions about your email
 address and the patch you're submitting.  Once you've answered them it
 will submit your patch via email.
 
 
 The perlbug program will ask you a few questions about your email
 address and the patch you're submitting.  Once you've answered them it
 will submit your patch via email.
 
+If your changes are in multiple commits, generate a patch for each of
+them:
+
+  % git format-patch origin/blead --attach
+
+Run perlbug without any attachments:
+
+  % ./perl -Ilib utils/perlbug
+
+Follow the prompts, picking a subject that summarizes your changes
+overall and has "[PATCH]" at the beginning. Describe your changes in the
+editor window that opens.  Instead of sending the report, press 'f' to
+save the message to a file, then quit.
+
+Now create an email using the headers and body from the
+perlbug-generated file, and attach your patches.
+
 =item * Thank you
 
 The porters appreciate the time you spent helping to make Perl better.
 Thank you!
 
 =item * Thank you
 
 The porters appreciate the time you spent helping to make Perl better.
 Thank you!
 
+=item * Next time
+
+The next time you wish to make a patch, you need to start from the
+latest perl in a pristine state. Check you don't have any local changes
+or added files in your perl check-out which you wish to keep, then run
+these commands:
+
+  % git pull
+  % git reset --hard origin/blead
+  % git clean -dxf
+
 =back
 
 =head1 BUG REPORTING
 =back
 
 =head1 BUG REPORTING
@@ -154,18 +190,18 @@ found at L<http://github.com/mirrors/perl>.
 You can also choose to use rsync to get a copy of the current source
 tree for the bleadperl branch and all maintenance branches:
 
 You can also choose to use rsync to get a copy of the current source
 tree for the bleadperl branch and all maintenance branches:
 
-    % rsync -avz rsync://perl5.git.perl.org/perl-current .
-    % rsync -avz rsync://perl5.git.perl.org/perl-5.12.x .
-    % rsync -avz rsync://perl5.git.perl.org/perl-5.10.x .
-    % rsync -avz rsync://perl5.git.perl.org/perl-5.8.x .
-    % rsync -avz rsync://perl5.git.perl.org/perl-5.6.x .
-    % rsync -avz rsync://perl5.git.perl.org/perl-5.005xx .
+  % rsync -avz rsync://perl5.git.perl.org/perl-current .
+  % rsync -avz rsync://perl5.git.perl.org/perl-5.12.x .
+  % rsync -avz rsync://perl5.git.perl.org/perl-5.10.x .
+  % rsync -avz rsync://perl5.git.perl.org/perl-5.8.x .
+  % rsync -avz rsync://perl5.git.perl.org/perl-5.6.x .
+  % rsync -avz rsync://perl5.git.perl.org/perl-5.005xx .
 
 (Add the C<--delete> option to remove leftover files.)
 
 To get a full list of the available sync points:
 
 
 (Add the C<--delete> option to remove leftover files.)
 
 To get a full list of the available sync points:
 
-    % rsync perl5.git.perl.org::
+  % rsync perl5.git.perl.org::
 
 =head2 Write access via git
 
 
 =head2 Write access via git