X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlrepository.pod;h=58c648cc61fe3f34e062ed39804f8d6597f5eaef;hb=12322d22877aba05e1653bbb960254200db8f045;hp=bfc8e688f75208708177d0b5f45fb8d761fc160e;hpb=1a0f15d53861f34964b4310e5438a72168cefacf;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod index bfc8e68..58c648c 100644 --- a/pod/perlrepository.pod +++ b/pod/perlrepository.pod @@ -29,17 +29,17 @@ access it at: You will need a copy of Git for your computer. You can fetch a copy of the repository using the Git protocol (which uses port 9418): - git clone git://perl5.git.perl.org/perl.git perl.git + git clone git://perl5.git.perl.org/perl.git perl-git -This clones the repository and makes a local copy in the 'perl.git' +This clones the repository and makes a local copy in the 'perl-git' directory. If your local network does not allow you to use port 9418, then you can -fetch a copy of the repository over HTTP: +fetch a copy of the repository over HTTP (this is slower): - git clone http://perl5.git.perl.org/perl.git perl.http + git clone http://perl5.git.perl.org/perl.git perl-http -This clones the repository and makes a local copy in the 'perl.http' +This clones the repository and makes a local copy in the 'perl-http' directory. =head2 WRITE ACCESS TO THE REPOSITORY @@ -47,13 +47,13 @@ directory. If you are a committer, then you can fetch a copy of the repository that you can push back on with: - git clone ssh://perl5.git.perl.org/gitroot/perl.git perl.ssh + git clone ssh://perl5.git.perl.org/gitroot/perl.git perl-ssh -This clones the repository and makes a local copy in the 'perl.ssh' -directory. +This clones the repository and makes a local copy in the 'perl-ssh' +directory. If you clone using git, which is faster than ssh, then you will need to -modify your config in order to enable config. edit .git/config where +modify your config in order to enable pushing. Edit .git/config where you will see something like: [remote "origin"] @@ -72,17 +72,162 @@ Once you have changed into the repository directory, you can inspect it. The repository contains a few branches: - % git branch -a * blead + % git branch -a + * blead origin/HEAD origin/blead ... You can see recent commits: - % git log - ... + % git log And pull new changes from the repository: % git pull + +To switch to another branch: + + % git checkout origin/maint-5.8-dor + +To switch back to blead: + + % git checkout blead + +=head1 SUBMITTING A PATCH + +If you have a patch in mind for Perl, you should first get a copy of +the repository: + + % git clone git://perl5.git.perl.org/perl.git perl-git + +Then change into the directory: + + % cd perl-git + +Alternatively, if you already have a Perl repository, you should +ensure that you're on the I branch, and your repostiroy +is up to date: + + % git checkout blead + % git pull + +Now that we have everything up to date, we need to create a temporary new +branch for these changes and switch into it: + + % git branch orange + % git checkout orange + +Then make your changes. For example, if Leon Brocard changes his name +to Orange Brocard, we should change his name in the AUTHORS file: + + % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS + +You can see what files are changed: + + % git status + # On branch blead + # Changes to be committed: + # (use "git reset HEAD ..." to unstage) + # + # modified: AUTHORS + # + +And you can see the changes: + + % git diff + diff --git a/AUTHORS b/AUTHORS + index 293dd70..722c93e 100644 + --- a/AUTHORS + +++ b/AUTHORS + @@ -541,7 +541,7 @@ Lars Hecking + Laszlo Molnar + Leif Huhn + Len Johnson + -Leon Brocard + +Orange Brocard + Les Peters + Lesley Binks + Lincoln D. Stein + +Now commit your change locally: + + % git add AUTHORS + % git commit -m 'Rename Leon Brocard to Orange Brocard' + Created commit 6196c1d: Rename Leon Brocard to Orange Brocard + 1 files changed, 1 insertions(+), 1 deletions(-) + +Now you should create a patch file for all your local changes: + + % git format-patch origin + 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch + +You should now send an email to perl5-porters@perl.org with a +description of your changes, and attach this patch file as an +attachment. + +If you want to delete your temporary branch, you may do so with: + + % git checkout blead + % git branch -d orange + error: The branch 'orange' is not an ancestor of your current HEAD. + If you are sure you want to delete it, run 'git branch -D orange'. + % git branch -D orange + Deleted branch orange. + +=head1 ACCEPTING A PATCH + +If you have received a patch file generated using the above section, +you should try out the patch. + +First we need to create a temporary new branch for these changes and +switch into it: + + % git branch experimental + % git checkout experimental + +Now we should apply the patch: + + % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch + Applying Rename Leon Brocard to Orange Brocard + +Now we can inspect the change: + + % git log + commit b1b3dab48344cff6de4087efca3dbd63548ab5e2 + Author: Leon Brocard + Date: Fri Dec 19 17:02:59 2008 +0000 + + Rename Leon Brocard to Orange Brocard ... + + % git diff blead + diff --git a/AUTHORS b/AUTHORS + index 293dd70..722c93e 100644 + --- a/AUTHORS + +++ b/AUTHORS + @@ -541,7 +541,7 @@ Lars Hecking + Laszlo Molnar + Leif Huhn + Len Johnson + -Leon Brocard + +Orange Brocard + Les Peters + Lesley Binks + Lincoln D. Stein + +If you are a committer to Perl and you think the patch is good, you can +then merge it into blead then push it out to the main repository: + + % git checkout blead + % git pull . experimental + % git push + +If you want to delete your temporary branch, you may do so with: + + % git checkout blead + % git branch -d experimental + error: The branch 'experimental' is not an ancestor of your current HEAD. + If you are sure you want to delete it, run 'git branch -D experimental'. + % git branch -D experimental + Deleted branch experimental.