=encoding euc-jp =for comment Consistent formatting of this file is achieved with: perl ./Porting/podtidy pod/perlrepository.pod =head1 NAME =begin original perlrepository - Using the Perl source repository =end original perlrepository - Perl ¥½¡¼¥¹¥ê¥Ý¥¸¥È¥ê¤ò»È¤¦ =head1 SYNOPSIS =begin original All of Perl's source code is kept centrally in a Git repository at I. The repository contains many Perl revisions from Perl 1 onwards and all the revisions from Perforce, the version control system we were using previously. This repository is accessible in different ways. =end original Perl¤Î¥½¡¼¥¹¥³¡¼¥É¤Ï¤¹¤Ù¤Æ¡¢I ¤Î Git ¥ê¥Ý¥¸¥È¥ê¤Ë ½¸Ãæ´ÉÍý¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤Î¥ê¥Ý¥¸¥È¥ê¤Ë¤Ï¡¢Perl 1 °Ê¹ß¤Î¿¤¯¤Î Perl ¥ê¥Ó¥¸¥ç¥ó¤È¡¢ °ÊÁ°»ÈÍѤ·¤Æ¤¤¤¿¥Ð¡¼¥¸¥ç¥ó´ÉÍý¥·¥¹¥Æ¥à¤Ç¤¢¤ë Perforce ¤Î¤¹¤Ù¤Æ¤Î ¥ê¥Ó¥¸¥ç¥ó¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤Î¥ê¥Ý¥¸¥È¥ê¤Ë¤Ï¡¢¤µ¤Þ¤¶¤Þ¤ÊÊýË¡¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡£ =begin original The full repository takes up about 80MB of disk space. A check out of the blead branch (that is, the main development branch, which contains bleadperl, the development version of perl 5) takes up about 160MB of disk space (including the repository). A build of bleadperl takes up about 200MB (including the repository and the check out). =end original ¥Õ¥ë¥ê¥Ý¥¸¥È¥ê¤ÏÌó 80 MB¤Î¥Ç¥£¥¹¥¯¥¹¥Ú¡¼¥¹¤ò»ÈÍѤ·¤Þ¤¹¡£ blead ¥Ö¥é¥ó¥Á(¤Ä¤Þ¤ê¡¢perl 5 ¤Î³«È¯¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ë bleadperl ¤ò´Þ¤à ¥á¥¤¥ó³«È¯¥Ö¥é¥ó¥Á)¤«¤é¤Î¥Á¥§¥Ã¥¯¥¢¥¦¥È¤Ï¡¢Ìó 160 MB¤Î¥Ç¥£¥¹¥¯¥¹¥Ú¡¼¥¹ (¥ê¥Ý¥¸¥È¥ê¤ò´Þ¤à)¤ò»ÈÍѤ·¤Þ¤¹¡£ bleadperl ¤Î¥Ó¥ë¥É¤Ï¡¢Ìó 200 MB(¥ê¥Ý¥¸¥È¥ê¤È¥Á¥§¥Ã¥¯¥¢¥¦¥È¤ò´Þ¤à)¤ò »ÈÍѤ·¤Þ¤¹¡£ =head1 GETTING ACCESS TO THE REPOSITORY (¥ê¥Ý¥¸¥È¥ê¤Ë¥¢¥¯¥»¥¹¤¹¤ë) =head2 READ ACCESS VIA THE WEB (Web ·Ðͳ¤ÎÆɤ߹þ¤ß¥¢¥¯¥»¥¹) =begin original You may access the repository over the web. This allows you to browse the tree, see recent commits, subscribe to RSS feeds for the changes, search for particular commits and more. You may access it at: =end original Web ·Ðͳ¤Ç¥ê¥Ý¥¸¥È¥ê¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡£ ¤³¤ì¤Ë¤è¤ê¡¢¥Ä¥ê¡¼¤Î»²¾È¡¢ºÇ¶á¤Î¥³¥ß¥Ã¥È¤Îɽ¼¨¡¢Êѹ¹¤Î RSS ¥Õ¥£¡¼¥É¤Î¹ØÆÉ¡¢ ÆÃÄê¤Î¥³¥ß¥Ã¥È¤Î¸¡º÷¤Ê¤É¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£ ¼¡¤Î¾ì½ê¤«¤é¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹: http://perl5.git.perl.org/perl.git =begin original A mirror of the repository is found at: =end original ¥ê¥Ý¥¸¥È¥ê¤Î¥ß¥é¡¼¤Ï°Ê²¼¤Ë¤¢¤ê¤Þ¤¹: http://github.com/mirrors/perl =head2 READ ACCESS VIA GIT (Git ·Ðͳ¤ÎÆɤ߹þ¤ß¥¢¥¯¥»¥¹) =begin original 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): =end original ¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿ÍѤΠGit ¤¬É¬ÍפǤ¹¡£ Git ¥×¥í¥È¥³¥ë(¥Ý¡¼¥È 9418 ¤ò»ÈÍÑ)¤ò»ÈÍѤ·¤Æ¡¢¥ê¥Ý¥¸¥È¥ê¤Î¥³¥Ô¡¼¤ò ¥Õ¥§¥Ã¥Á¤Ç¤­¤Þ¤¹¡£ % git clone git://perl5.git.perl.org/perl.git perl-git =begin original This clones the repository and makes a local copy in the F directory. =end original ¤³¤ì¤Ë¤è¤ê¡¢¥ê¥Ý¥¸¥È¥ê¤ÏÊ£À½¤µ¤ì¡¢F ¥Ç¥£¥ì¥¯¥È¥ê¤Ë ¥í¡¼¥«¥ë¥³¥Ô¡¼¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ =begin original If your local network does not allow you to use port 9418, then you can fetch a copy of the repository over HTTP (this is at least 4x slower): =end original ¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ç¥Ý¡¼¥È 9418 ¤Î»ÈÍѤ¬µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢ HTTP ·Ðͳ¤Ç¥ê¥Ý¥¸¥È¥ê¤Î¥³¥Ô¡¼¤ò¥Õ¥§¥Ã¥Á¤Ç¤­¤Þ¤¹(¤³¤ì¤Ï¾¯¤Ê¤¯¤È¤â 4 ÇÜ Ä㮤Ǥ¹)¡£ % git clone http://perl5.git.perl.org/perl.git perl-http =begin original This clones the repository and makes a local copy in the F directory. =end original ¤³¤ì¤Ë¤è¤ê¡¢¥ê¥Ý¥¸¥È¥ê¤¬Ê£À½¤µ¤ì¡¢F ¥Ç¥£¥ì¥¯¥È¥ê¤Ë ¥í¡¼¥«¥ë¥³¥Ô¡¼¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ =head2 WRITE ACCESS TO THE REPOSITORY (¥ê¥Ý¥¸¥È¥ê¤Ø¤Î½ñ¤­¹þ¤ß¥¢¥¯¥»¥¹) =begin original If you are a committer, then you can fetch a copy of the repository that you can push back on with: =end original ¥³¥ß¥Ã¥¿¤Ç¤¢¤ì¤Ð¡¢¥×¥Ã¥·¥å¥Ð¥Ã¥¯²Äǽ¤Ê¥ê¥Ý¥¸¥È¥ê¤Î¥³¥Ô¡¼¤ò ¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ % git clone ssh://perl5.git.perl.org/perl.git perl-ssh =begin original This clones the repository and makes a local copy in the F directory. =end original ¤³¤ì¤Ë¤è¤ê¡¢¥ê¥Ý¥¸¥È¥ê¤¬Ê£À½¤µ¤ì¡¢F ¥Ç¥£¥ì¥¯¥È¥ê¤Ë ¥í¡¼¥«¥ë¥³¥Ô¡¼¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ =begin original If you cloned using the git protocol, which is faster than ssh, then you will need to modify the URL for the origin remote to enable pushing. To do that edit F<.git/config> with L like this: =end original ssh ¤è¤ê¤â¹â®¤Ê git ¥×¥í¥È¥³¥ë¤ò»ÈÍѤ·¤Æ¥¯¥í¡¼¥ó¤òºîÀ®¤·¤¿¾ì¹ç¤Ï¡¢ ¥×¥Ã¥·¥å¤òÍ­¸ú¤Ë¤¹¤ë¤¿¤á¤Ë origin remote ¤Î¤¿¤á¤Î URL ¤ò Êѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¤½¤¦¤¹¤ë¤¿¤á¤Ë¤Ï¡¢F<.git/config> ¤ò¼¡¤Î¤è¤¦¤ËÊÔ½¸¤·¤Þ¤¹: % git config remote.origin.url ssh://perl5.git.perl.org/perl.git =begin original You can also set up your user name and e-mail address. Most people do this once globally in their F<~/.gitconfig> by doing something like: =end original ¥æ¡¼¥¶¡¼Ì¾¤ÈÅŻҥ᡼¥ë¥¢¥É¥ì¥¹¤òÀßÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ ¤Û¤È¤ó¤É¤Î¿Í¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤³¤È¤Ç F<~/.gitconfig> ¤Ç¥°¥í¡¼¥Ð¥ë¤Ë °ìÅÙ¤³¤ì¤ò¹Ô¤¤¤Þ¤¹: % git config --global user.name "ŽÃ†var Arnfjörð Bjarmason" % git config --global user.email avarab@gmail.com =begin original However if you'd like to override that just for perl then execute then execute something like the following in F: =end original ¤·¤«¤·¡¢perl ¤À¤±¤ËÂФ·¤Æ¤³¤ì¤òÊѹ¹¤·¤¿¤¤¾ì¹ç¤Ï¡¢ F ¤Ç¼¡¤Î¤è¤¦¤Ê¤â¤Î¤ò¼Â¹Ô¤·¤Þ¤¹: % git config user.email avar@cpan.org =begin original It is also possible to keep C as a git remote, and add a new remote for ssh access: =end original C ¤ò git remote ¤È¤·¤Æ°Ý»ý¤·¡¢ssh ¥¢¥¯¥»¥¹ÍѤο·¤·¤¤ remote ¤ò Äɲ乤뤳¤È¤â²Äǽ¤Ç¤¹: % git remote add camel perl5.git.perl.org:/perl.git =begin original This allows you to update your local repository by pulling from C, which is faster and doesn't require you to authenticate, and to push your changes back with the C remote: =end original ¤³¤ì¤Ë¤è¤ê¡¢C ¤«¤é¥×¥ë¤·¤Æ¥í¡¼¥«¥ë¥ê¥Ý¥¸¥È¥ê¤ò¹¹¿·¤Ç¤­¤Þ¤¹; ¤³¤ì¤Ï¤è¤ê¹â®¤Ç¡¢Ç§¾Ú¤òɬÍפȤ·¤Þ¤»¤ó; ¤Þ¤¿¡¢C ¥ê¥â¡¼¥È¤ÇÊѹ¹¤ò¥×¥Ã¥·¥å¥Ð¥Ã¥¯¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ % git fetch camel % git push camel =begin original The C command just updates the C refs, as the objects themselves should have been fetched when pulling from C. =end original C ¥³¥Þ¥ó¥É¤Ïñ¤Ë C refs ¤ò¹¹¿·¤¹¤ë¤À¤±¤Ç¤¹; ¤Ê¤¼¤Ê¤é¡¢¥ª¥Ö¥¸¥§¥¯¥È¼«ÂÎ¤Ï C ¤«¤é¥×¥ë¤¹¤ë¤È¤­¤Ë ¥Õ¥§¥Ã¥Á¤µ¤ì¤ë¤Ù¤­¤À¤«¤é¤Ç¤¹¡£ =head2 A NOTE ON CAMEL AND DROMEDARY (camel ¤È dromedary ¤Ë´Ø¤¹¤ëÃí°Õ) =begin original The committers have SSH access to the two servers that serve C. One is C itself (I), which is the 'master' repository. The second one is C (I), which can be used for general testing and development. Dromedary syncs the git tree from camel every few minutes, you should not push there. Both machines also have a full CPAN mirror in /srv/CPAN, please use this. To share files with the general public, dromedary serves your ~/public_html/ as C =end original ¥³¥ß¥Ã¥¿¤Ï¡¢C ¤Ë¥µ¡¼¥Ó¥¹¤òÄ󶡤¹¤ëÆó¤Ä¤Î ¥µ¡¼¥Ð¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡£ C ¼«¿È (I) ¤Ç¡¢ ¤³¤ì¤¬¡Ö¥Þ¥¹¥¿¡¼¡×¥ê¥Ý¥¸¥È¥ê¤Ç¤¹¡£ Æó¤ÄÌÜ¤Ï C (I) ¤Ç¡¢ °ìÈÌŪ¤Ê¥Æ¥¹¥È¤È³«È¯¤Ë»ÈÍѤǤ­¤Þ¤¹¡£ dromedary ¤Ï¿ôʬ¤´¤È¤Ë camel ¤«¤é git ¥Ä¥ê¡¼¤òƱ´ü¤¹¤ë¤Î¤Ç¡¢¤½¤³¤Ë ¥×¥Ã¥·¥å¤·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£ ξÊý¤Î¥Þ¥·¥ó¤Ë¤Ï /srv/CPAN ¤Ë´°Á´¤Ê CPAN ¥ß¥é¡¼¤â¤¢¤ë¤Î¤Ç¡¢ ¤³¤ì¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ dromedary ¤Ï¥Õ¥¡¥¤¥ë¤ò°ìÈ̸ø³«¤¹¤ë¤¿¤á¤Ë¡¢ ~/public_html/ ¤ò C ¤È¤·¤Æ Ä󶡤·¤Æ¤¤¤Þ¤¹¡£ =begin original These hosts have fairly strict firewalls to the outside. Outgoing, only rsync, ssh and git are allowed. For http and ftp, you can use http://webproxy:3128 as proxy. Incoming, the firewall tries to detect attacks and blocks IP addresses with suspicious activity. This sometimes (but very rarely) has false positives and you might get blocked. The quickest way to get unblocked is to notify the admins. =end original ¤³¤ì¤é¤Î¥Û¥¹¥È¤Ï¡¢³°Éô¤ËÂФ·¤Æ¤«¤Ê¤ê¸·³Ê¤Ê¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ Á÷¿®¤Ï rsync¡¢ssh¡¢git ¤À¤±¤¬µö²Ä¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ http ¤È ftp ¤ËÂФ·¤Æ¤Ï¡¢¥×¥í¥­¥·¤È¤·¤Æ http://webproxy:3128 ¤ò»ÈÍѤǤ­¤Þ¤¹¡£ ¼õ¿®¤Ï¡¢¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Ï¹¶·â¤ò¸¡½Ð¤·¡¢µ¿¤ï¤·¤¤¥¢¥¯¥Æ¥£¥Ó¥Æ¥£¤ò»ý¤Ä IP ¥¢¥É¥ì¥¹¤ò¥Ö¥í¥Ã¥¯¤·¤è¤¦¤È¤·¤Þ¤¹¡£ ¤³¤ì¤Ï»þ¤Ë(Èó¾ï¤Ë¤Þ¤ì¤Ë)¸í¸¡½Ð¤¬¤¢¤ê¡¢¥Ö¥í¥Ã¥¯¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ ¥Ö¥í¥Ã¥¯¤ò²ò½ü¤¹¤ëºÇ¤â´Êñ¤ÊÊýË¡¤Ï¡¢´ÉÍý¼Ô¤ËÄÌÃΤ¹¤ë¤³¤È¤Ç¤¹¡£ =begin original These two boxes are owned, hosted, and operated by booking.com. You can reach the sysadmins in #p5p on irc.perl.org or via mail to C =end original ¤³¤ì¤éÆó¤Ä¤Î¥Ü¥Ã¥¯¥¹¤Ï¡¢booking.com ¤Ë¤è¤Ã¤Æ½êÍ­¤µ¤ì¡¢¥Û¥¹¥È¤µ¤ì¡¢ ±¿±Ä¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¥·¥¹¥Æ¥à´ÉÍý¼Ô¤Ë¤Ï¡¢irc.perl.org ¤Î #p5p ¤«¡¢ C ¤Ø¤Î¥á¡¼¥ë¤ÇÏ¢Íí¤Ç¤­¤Þ¤¹¡£ =head1 OVERVIEW OF THE REPOSITORY (¥ê¥Ý¥¸¥È¥ê¤Î³µÍ×) =begin original Once you have changed into the repository directory, you can inspect it. =end original ¥ê¥Ý¥¸¥È¥ê¥Ç¥£¥ì¥¯¥È¥ê¤ËÊѹ¹¤ò²Ã¤¨¤¿¤é¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò¸¡ºº¤Ç¤­¤Þ¤¹¡£ =begin original After a clone the repository will contain a single local branch, which will be the current branch as well, as indicated by the asterisk. =end original ¥¯¥í¡¼¥óºîÀ®¸å¡¢¥ê¥Ý¥¸¥È¥ê¤Ë¤Ïñ°ì¤Î¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ ¤³¤Î¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤Ï¡¢¥¢¥¹¥¿¥ê¥¹¥¯¤Ç¼¨¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ë¡¢ ¸½ºß¤Î¥Ö¥é¥ó¥Á¤Ë¤â¤Ê¤ê¤Þ¤¹¡£ % git branch * blead =begin original Using the -a switch to C will also show the remote tracking branches in the repository: =end original C ¤Ë -a ¥¹¥¤¥Ã¥Á¤ò»ÈÍѤ¹¤ë¤È¡¢¥ê¥Ý¥¸¥È¥êÆâ¤Î ¥ê¥â¡¼¥È¥È¥é¥Ã¥­¥ó¥°¥Ö¥é¥ó¥Á¤âɽ¼¨¤µ¤ì¤Þ¤¹: % git branch -a * blead origin/HEAD origin/blead ... =begin original The branches that begin with "origin" correspond to the "git remote" that you cloned from (which is named "origin"). Each branch on the remote will be exactly tracked by theses branches. You should NEVER do work on these remote tracking branches. You only ever do work in a local branch. Local branches can be configured to automerge (on pull) from a designated remote tracking branch. This is the case with the default branch C which will be configured to merge from the remote tracking branch C. =end original "origin" ¤Ç»Ï¤Þ¤ë¥Ö¥é¥ó¥Á¤Ï¡¢¥¯¥í¡¼¥ó¸µ¤Î "git remote" ("origin" ¤È¤¤¤¦Ì¾Á°) ¤ËÂбþ¤·¤Þ¤¹¡£ ¥ê¥â¡¼¥È¤Î³Æ¥Ö¥é¥ó¥Á¤Ï¡¢¤³¤ì¤é¤Î¥Ö¥é¥ó¥Á¤Ë¤è¤Ã¤ÆÀµ³Î¤ËÄÉÀפµ¤ì¤Þ¤¹¡£ ¤³¤ì¤é¤Î¥ê¥â¡¼¥ÈÄÉÀ×¥Ö¥é¥ó¥Á¤Ç¤ÏÀäÂФ˺î¶È¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ ¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤Ç¤Î¤ßºî¶È¤·¤Þ¤¹¡£ ¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤Ï¡¢»ØÄꤵ¤ì¤¿¥ê¥â¡¼¥ÈÄÉÀ×¥Ö¥é¥ó¥Á¤«¤é (¥×¥ë»þ¤Ë)¼«Æ°¥Þ¡¼¥¸¤¹¤ë¤è¤¦¤Ë¹½À®¤Ç¤­¤Þ¤¹¡£ ¤³¤ì¤Ï¡¢¥ê¥â¡¼¥ÈÄÉÀ×¥Ö¥é¥ó¥Á C ¤«¤é¥Þ¡¼¥¸¤¹¤ë¤è¤¦¤Ë ¹½À®¤µ¤ì¤Æ¤¤¤ë¥Ç¥Õ¥©¥ë¥È¥Ö¥é¥ó¥Á C ¤Î¾ì¹ç¤Ç¤¹¡£ =begin original You can see recent commits: =end original ºÇ¶á¤Î¥³¥ß¥Ã¥È¤ò¸«¤é¤ì¤Þ¤¹: % git log =begin original And pull new changes from the repository, and update your local repository (must be clean first) =end original ¥ê¥Ý¥¸¥È¥ê¤«¤é¿·¤·¤¤Êѹ¹¤ò¥×¥ë¤·¡¢¥í¡¼¥«¥ë¥ê¥Ý¥¸¥È¥ê¤ò¹¹¿·¤·¤Þ¤¹ (ºÇ½é¤Ë¥¯¥ê¡¼¥ó¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹)¡£ % git pull =begin original Assuming we are on the branch C immediately after a pull, this command would be more or less equivalent to: =end original ¥×¥ë¤Îľ¸å¤Ë¥Ö¥é¥ó¥Á C ¤Ë¤¤¤ë¤È²¾Äꤹ¤ë¤È¡¢¤³¤Î¥³¥Þ¥ó¥É¤Ï °Ê²¼¤È¤Û¤ÜÅù²Á¤Ë¤Ê¤ê¤Þ¤¹: % git fetch % git merge origin/blead =begin original In fact if you want to update your local repository without touching your working directory you do: =end original ¼ÂºÝ¡¢ºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¢¥¯¥»¥¹¤»¤º¤Ë¥í¡¼¥«¥ë¥ê¥Ý¥¸¥È¥ê¤ò¹¹¿·¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹: % git fetch =begin original And if you want to update your remote-tracking branches for all defined remotes simultaneously you can do =end original ¤Þ¤¿¡¢ÄêµÁ¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥ê¥â¡¼¥È¤ËÂФ·¤Æ¥ê¥â¡¼¥ÈÄÉÀ×¥Ö¥é¥ó¥Á¤ò Ʊ»þ¤Ë¹¹¿·¤·¤¿¤¤¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹: % git remote update =begin original Neither of these last two commands will update your working directory, however both will update the remote-tracking branches in your repository. =end original ºÇ¸å¤ÎÆó¤Ä¤Î¥³¥Þ¥ó¥É¤Ï¤É¤Á¤é¤âºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤ò¹¹¿·¤·¤Þ¤»¤ó¤¬¡¢¤É¤Á¤é¤â ¥ê¥Ý¥¸¥È¥êÆâ¤Î¥ê¥â¡¼¥ÈÄÉÀ×¥Ö¥é¥ó¥Á¤ò¹¹¿·¤·¤Þ¤¹¡£ =begin original To switch to another branch: =end original ¾¤Î¥Ö¥é¥ó¥Á¤ËÀÚ¤êÂؤ¨¤ë¤Ë¤Ï: % git checkout origin/maint-5.8-dor =begin original To make a local branch of a remote branch: =end original ¥ê¥â¡¼¥È¥Ö¥é¥ó¥Á¤Î¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤òºî¤ë¤Ë¤Ï: % git checkout -b maint-5.10 origin/maint-5.10 =begin original To switch back to blead: =end original blead ¤ËÌá¤ë¤Ë¤Ï: % git checkout blead =head2 FINDING OUT YOUR STATUS (¸½ºß¤Î¾õÂÖ¤ò³Îǧ¤¹¤ë) =begin original The most common git command you will use will probably be =end original ¤ª¤½¤é¤¯¤â¤Ã¤È¤â¤è¤¯»È¤¦ git ¥³¥Þ¥ó¥É¤Ï: % git status =begin original This command will produce as output a description of the current state of the repository, including modified files and unignored untracked files, and in addition it will show things like what files have been staged for the next commit, and usually some useful information about how to change things. For instance the following: =end original ¤³¤Î¥³¥Þ¥ó¥É¤Ï¡¢Êѹ¹¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ä̵»ë¤µ¤ì¤Æ¤¤¤Ê¤¤ ÄÉÀפµ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥¡¥¤¥ë¤Ê¤É¡¢¥ê¥Ý¥¸¥È¥ê¤Î¸½ºß¤Î¾õÂÖ¤ÎÀâÌÀ¤ò ½ÐÎϤȤ·¤ÆÀ¸À®¤·¤Þ¤¹¡£ ¤µ¤é¤Ë¡¢¼¡¤Î¥³¥ß¥Ã¥È¤Î¤¿¤á¤Ë¥¹¥Æ¡¼¥¸¥ó¥°¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ä¡¢ Ä̾ï¤ÏÊѹ¹ÊýË¡¤Ë´Ø¤¹¤ëÍ­ÍѤʾðÊó¤òɽ¼¨¤·¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹: $ git status # On branch blead # Your branch is ahead of 'origin/blead' by 1 commit. # # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: pod/perlrepository.pod # # Changed but not updated: # (use "git add ..." to update what will be committed) # # modified: pod/perlrepository.pod # # Untracked files: # (use "git add ..." to include in what will be committed) # # deliberate.untracked =begin original This shows that there were changes to this document staged for commit, and that there were further changes in the working directory not yet staged. It also shows that there was an untracked file in the working directory, and as you can see shows how to change all of this. It also shows that there is one commit on the working branch C which has not been pushed to the C remote yet. B: that this output is also what you see as a template if you do not provide a message to C. =end original ¤³¤ì¤Ï¡¢¥³¥ß¥Ã¥È¤Î¤¿¤á¤Ë¥¹¥Æ¡¼¥¸¥ó¥°¤µ¤ì¤¿¤³¤Îʸ½ñ¤ËÊѹ¹¤¬¤¢¤Ã¤¿¤³¤È¤È¡¢ ¤Þ¤À¥¹¥Æ¡¼¥¸¥ó¥°¤µ¤ì¤Æ¤¤¤Ê¤¤¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤Ë ¤µ¤é¤ËÊѹ¹¤¬¤¢¤Ã¤¿¤³¤È¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£ ¤Þ¤¿¡¢¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤ËÄÉÀפµ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥¡¥¤¥ë¤¬ ¤¢¤Ã¤¿¤³¤È¤â¼¨¤·¤Æ¤¤¤Þ¤¹; ¤Þ¤¿¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤òÊѹ¹¤¹¤ëÊýË¡¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£ ¤Þ¤¿¡¢C ¥ê¥â¡¼¥È¤Ë¤Þ¤À¥×¥Ã¥·¥å¤µ¤ì¤Æ¤¤¤Ê¤¤¥ï¡¼¥­¥ó¥°¥Ö¥é¥ó¥Á C ¤Ë°ì¤Ä¤Î¥³¥ß¥Ã¥È¤¬¤¢¤ë¤³¤È¤â¼¨¤·¤Æ¤¤¤Þ¤¹¡£ B<Ãí>: ¤³¤Î½ÐÎϤϡ¢C ¤Ë¥á¥Ã¥»¡¼¥¸¤òÄ󶡤·¤Ê¤¤¾ì¹ç¤Ë ¥Æ¥ó¥×¥ì¡¼¥È¤È¤·¤Æɽ¼¨¤µ¤ì¤ë¤â¤Î¤Ç¤â¤¢¤ê¤Þ¤¹¡£ =begin original Assuming that you'd like to commit all the changes you've just made as a a single atomic unit, run this command: =end original º£¹Ô¤Ã¤¿¤¹¤Ù¤Æ¤ÎÊѹ¹¤ò°ì¤Ä¤Î¥¢¥È¥ß¥Ã¥¯¥æ¥Ë¥Ã¥È¤È¤·¤Æ¥³¥ß¥Ã¥È¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ¼¡¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹: % git commit -a =begin original (That C<-a> tells git to add every file you've changed to this commit. New files aren't automatically added to your commit when you use C If you want to add files or to commit some, but not all of your changes, have a look at the documentation for C.) =end original (C<-a> ¤Ï git ¤ËÂФ·¤Æ¡¢Êѹ¹¤·¤¿¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ò¤³¤Î¥³¥ß¥Ã¥È¤Ë Äɲ乤ë¤è¤¦¤Ë»Ø¼¨¤·¤Þ¤¹¡£ C ¤ò»ÈÍѤ·¤Æ¤â¡¢¿·¤·¤¤¥Õ¥¡¥¤¥ë¤Ï¼«Æ°Åª¤Ë¥³¥ß¥Ã¥È¤ËÄɲ䵤ì¤Þ¤»¤ó¡£ ¥Õ¥¡¥¤¥ë¤òÄɲä·¤¿¤¤¾ì¹ç¤ä¡¢°ìÉô¤ÎÊѹ¹¤ò¥³¥ß¥Ã¥È¤·¤¿¤¤¾ì¹ç¤Ï¡¢ C ¤Îʸ½ñ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ =begin original Git will start up your favorite text editor, so that you can craft a commit message for your change. See L below for more information about what makes a good commit message. =end original Git ¤Ï¡¢¤¢¤Ê¤¿¤¬Êѹ¹ÆâÍƤΥ³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤Ç¤­¤ë¤è¤¦¤Ë¡¢ ¤ªµ¤¤ËÆþ¤ê¤Î¥Æ¥­¥¹¥È¥¨¥Ç¥£¥¿¤òµ¯Æ°¤·¤Þ¤¹¡£ ŬÀڤʥ³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤¹¤ëÊýË¡¤Ë´Ø¤¹¤ë¤µ¤é¤Ê¤ë¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢ ¸å½Ò¤Î L ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ =begin original Once you've finished writing your commit message and exited your editor, git will write your change to disk and tell you something like this: =end original ¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤ò½ñ¤­½ª¤¨¤Æ¥¨¥Ç¥£¥¿¤ò½ªÎ»¤¹¤ë¤È¡¢ git ¤ÏÊѹ¹¤ò¥Ç¥£¥¹¥¯¤Ë½ñ¤­¹þ¤ß¡¢°Ê²¼¤Î¤è¤¦¤Ê¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¤Þ¤¹: Created commit daf8e63: explain git status and stuff about remotes 1 files changed, 83 insertions(+), 3 deletions(-) =begin original If you re-run C, you should see something like this: =end original C ¤òºÆ¼Â¹Ô¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤¬ÆÀ¤é¤ì¤Þ¤¹: % git status # On branch blead # Your branch is ahead of 'origin/blead' by 2 commits. # # Untracked files: # (use "git add ..." to include in what will be committed) # # deliberate.untracked nothing added to commit but untracked files present (use "git add" to track) =begin original When in doubt, before you do anything else, check your status and read it carefully, many questions are answered directly by the git status output. =end original ²¿¤«µ¿Ì䤬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢²¿¤«¤ò¤¹¤ëÁ°¤Ë¼«Ê¬¤Î¥¹¥Æ¡¼¥¿¥¹¤ò¥Á¥§¥Ã¥¯¤·¤Æ Ãí°Õ¿¼¤¯Æɤó¤Ç¤¯¤À¤µ¤¤; ¿¤¯¤Îµ¿Ìä¤ËÂФ·¤Æ¤Ï¡¢git status ½ÐÎϤ¬Ä¾ÀÜÅú¤¨¤Æ¤¯¤ì¤Þ¤¹¡£ =head1 SUBMITTING A PATCH (¥Ñ¥Ã¥Á¤òÅê¹Æ¤¹¤ë) =begin original If you have a patch in mind for Perl, you should first get a copy of the repository: =end original Perl ÍѤΥѥåÁ¤ò¹Í¤¨¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤Þ¤º¥ê¥Ý¥¸¥È¥ê¤Î¥³¥Ô¡¼¤ò Æþ¼ê¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ % git clone git://perl5.git.perl.org/perl.git perl-git =begin original Then change into the directory: =end original ¤½¤ì¤«¤é¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤Þ¤¹: % cd perl-git =begin original Alternatively, if you already have a Perl repository, you should ensure that you're on the I branch, and your repository is up to date: =end original ¤¢¤ë¤¤¤Ï¡¢¤¹¤Ç¤Ë Perl ¥ê¥Ý¥¸¥È¥ê¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ I ¥Ö¥é¥ó¥Á¤Ë¤¤¤Æ¡¢¥ê¥Ý¥¸¥È¥ê¤¬ºÇ¿·¤Ç¤¢¤ë¤³¤È¤ò³Îǧ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹: % git checkout blead % git pull =begin original It's preferable to patch against the latest blead version, since this is where new development occurs for all changes other than critical bug fixes. Critical bug fix patches should be made against the relevant maint branches, or should be submitted with a note indicating all the branches where the fix should be applied. =end original ºÇ¿·¤Î blead ¥Ð¡¼¥¸¥ç¥ó¤ËÂФ·¤Æ¥Ñ¥Ã¥Á¤òŬÍѤ¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£ ¤³¤ì¤Ï¡¢½ÅÂç¤Ê¥Ð¥°½¤Àµ°Ê³°¤Î¤¹¤Ù¤Æ¤ÎÊѹ¹¤ËÂФ·¤Æ¿·¤¿¤Ê³«È¯¤¬¹Ô¤ï¤ì¤ë ¾ì½ê¤Ç¤¢¤ë¤¿¤á¤Ç¤¹¡£ ½ÅÂç¤Ê¥Ð¥°½¤Àµ¥Ñ¥Ã¥Á¤Ï¡¢´ØÏ¢¤¹¤ë¥á¥¤¥ó¥Ö¥é¥ó¥Á¤ËÂФ·¤ÆºîÀ®¤¹¤ë¤«¡¢ ½¤Àµ¤¬Å¬ÍѤµ¤ì¤ë¤¹¤Ù¤Æ¤Î¥Ö¥é¥ó¥Á¤ò¼¨¤¹¥á¥â¤È¤È¤â¤ËÄó½Ð¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original Now that we have everything up to date, we need to create a temporary new branch for these changes and switch into it: =end original ¤¹¤Ù¤Æ¤¬ºÇ¿·¤Î¾õÂ֤ˤʤ俤Τǡ¢¤³¤ì¤é¤ÎÊѹ¹¤ËÂФ·¤Æ°ì»þŪ¤Ê ¿·¤·¤¤¥Ö¥é¥ó¥Á¤òºîÀ®¤·¡¢¤½¤Î¥Ö¥é¥ó¥Á¤ËÀÚ¤êÂؤ¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹: % git checkout -b orange =begin original which is the short form of =end original ¤³¤ì¤Ï°Ê²¼¤Î¤â¤Î¤Îû½Ì·Á¤Ç¤¹ % git branch orange % git checkout orange =begin original Creating a topic branch makes it easier for the maintainers to rebase or merge back into the master blead for a more linear history. If you don't work on a topic branch the maintainer has to manually cherry pick your changes onto blead before they can be applied. =end original ¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤òºîÀ®¤¹¤ë¤³¤È¤Ç¡¢¥á¥ó¥Æ¥Ê¤Ï¤è¤ê¥ê¥Ë¥¢¤ÊÍúÎò¤Î¤¿¤á¤Ë master blead ¤Ë¥ê¥Ù¡¼¥¹¤Þ¤¿¤Ï¥Þ¡¼¥¸¥Ð¥Ã¥¯¤¹¤ë¤³¤È¤¬´Êñ¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤Çºî¶È¤·¤Ê¤¤¾ì¹ç¡¢ ¥á¥ó¥Æ¥Ê¤ÏÊѹ¹¤òŬÍѤ¹¤ëÁ°¤Ë¼êÆ°¤Ç blead ¤Ë¥Á¥§¥ê¡¼¥Ô¥Ã¥¯¤¹¤ë ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original That'll get you scolded on perl5-porters, so don't do that. Be Awesome. =end original perl5-porters ¤Ç¼¸¤é¤ì¤ë¤³¤È¤Ë¤Ê¤ë¤Î¤Ç¡¢¤½¤ó¤Ê¤³¤È¤Ï¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ ¤¦¤Þ¤¯¤ä¤ê¤Þ¤·¤ç¤¦¡£ =begin original Then make your changes. For example, if Leon Brocard changes his name to Orange Brocard, we should change his name in the AUTHORS file: =end original ¼¡¤Ë¡¢Êѹ¹¤ò²Ã¤¨¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢Leon Brocard ¤¬Ì¾Á°¤ò Orange Brocard ¤ËÊѹ¹¤·¤¿¾ì¹ç¡¢ AUTHORS ¥Õ¥¡¥¤¥ëÆâ¤Î̾Á°¤òÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹: % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS =begin original You can see what files are changed: =end original ¤É¤Î¥Õ¥¡¥¤¥ë¤òÊѹ¹¤·¤¿¤«¤ò¸«¤é¤ì¤Þ¤¹: % git status # On branch orange # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: AUTHORS # =begin original And you can see the changes: =end original ¤½¤·¤ÆÊѹ¹¤¬¸«¤é¤ì¤Þ¤¹: % 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 =begin original Now commit your change locally: =end original ¤³¤³¤ÇÊѹ¹¤ò¥í¡¼¥«¥ë¤Ë¥³¥ß¥Ã¥È¤·¤Þ¤¹: % git commit -a -m 'Rename Leon Brocard to Orange Brocard' Created commit 6196c1d: Rename Leon Brocard to Orange Brocard 1 files changed, 1 insertions(+), 1 deletions(-) =begin original You can examine your last commit with: =end original ºÇ¸å¤Î¥³¥ß¥Ã¥È¤ò°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¸¡ºº¤Ç¤­¤Þ¤¹: % git show HEAD =begin original and if you are not happy with either the description or the patch itself you can fix it up by editing the files once more and then issue: =end original ÀâÌÀ¤Þ¤¿¤Ï¥Ñ¥Ã¥Á¼«ÂΤËËþ­¤Ç¤­¤Ê¤¤¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤ò¤â¤¦°ìÅÙÊÔ½¸¤·¤Æ¤«¤é ¼¡¤Î¥³¥Þ¥ó¥É¤òȯ¹Ô¤¹¤ë¤³¤È¤Ç½¤Àµ¤Ç¤­¤Þ¤¹: % git commit -a --amend =begin original Now you should create a patch file for all your local changes: =end original ¤³¤³¤ÇÁ´¤Æ¤Î¥í¡¼¥«¥ë¤ÊÊѹ¹¤Î¤¿¤á¤Î¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë¤òºî¤ë¤Ù¤­¤Ç¤¹: % git format-patch origin 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch =begin original You should now send an email to perl5-porters@perl.org with a description of your changes, and include this patch file as an attachment. (See the next section for how to configure and use git to send these emails for you.) =end original perl5-porters@perl.org °¸¤ËÊѹ¹ÆâÍƤòµ­ºÜ¤·¤¿¥á¡¼¥ë¤òÁ÷¿®¤·¡¢ ¤³¤Î¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë¤òźÉÕ¥Õ¥¡¥¤¥ë¤È¤·¤ÆÁ÷¤Ã¤Æ¤¯¤À¤µ¤¤ (¤³¤ì¤é¤Î¥á¡¼¥ë¤òÁ÷¿®¤¹¤ë¤¿¤á¤Ë git ¤òÀßÄꤷ¤Æ»È¤¦ÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢ ¼¡¤ÎÀá¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤)¡£ =begin original If you want to delete your temporary branch, you may do so with: =end original °ì»þŪ¤Ê¥Ö¥é¥ó¥Á¤òºï½ü¤·¤¿¤¤¤Ê¤é¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ç¤­¤Þ¤¹: % 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. =head2 Using git to send patch emails =begin original In your ~/git/perl repository, set the destination email to the perl5-porters mailing list. =end original ~/git/perl ¥ê¥Ý¥¸¥È¥ê¤Ç¡¢°¸Àè¥á¡¼¥ë¤ò perl5-porter ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ë ÀßÄꤷ¤Þ¤¹¡£ $ git config sendemail.to perl5-porters@perl.org =begin original Then you can use git directly to send your patch emails: =end original ¤½¤Î¸å¡¢git ¤òľÀܻȤäƥѥåÁ¥á¡¼¥ë¤òÁ÷¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹: $ git send-email 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch =begin original You may need to set some configuration variables for your particular email service provider. For example, to set your global git config to send email via a gmail account: =end original ÆÃÄê¤ÎÅŻҥ᡼¥ë¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¤ËÂФ·¤Æ¤¤¤¯¤Ä¤«¤ÎÀßÄêÊÑ¿ô¤òÀßÄꤹ¤ë ɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ Î㤨¤Ð¡¢gmail ¥¢¥«¥¦¥ó¥È·Ðͳ¤ÇÅŻҥ᡼¥ë¤òÁ÷¿®¤¹¤ë¤è¤¦¤Ë ¥°¥í¡¼¥Ð¥ë git ¤òÀßÄꤹ¤ë¤Ë¤Ï: $ git config --global sendemail.smtpserver smtp.gmail.com $ git config --global sendemail.smtpssl 1 $ git config --global sendemail.smtpuser YOURUSERNAME@gmail.com =begin original With this configuration, you will be prompted for your gmail password when you run 'git send-email'. You can also configure C with your password if you don't care about having your password in the .gitconfig file. =end original ¤³¤ÎÀßÄê¤Ç¤Ï¡¢'git send-email' ¤ò¼Â¹Ô¤¹¤ë¤È¤­¤Ë gmail ¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤é¤ì¤Þ¤¹¡£ .gitconfig ¥Õ¥¡¥¤¥ë¤Ë¥Ñ¥¹¥ï¡¼¥É¤òÊݸ¤·¤¿¤¯¤Ê¤¤¾ì¹ç¤Ï¡¢ C ¤Ë¥Ñ¥¹¥ï¡¼¥É¤òÀßÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ =head2 A note on derived files (ÇÉÀ¸¥Õ¥¡¥¤¥ë¤Ë´Ø¤¹¤ëÃí°Õ) =begin original Be aware that many files in the distribution are derivative--avoid patching them, because git won't see the changes to them, and the build process will overwrite them. Patch the originals instead. Most utilities (like perldoc) are in this category, i.e. patch utils/perldoc.PL rather than utils/perldoc. Similarly, don't create patches for files under $src_root/ext from their copies found in $install_root/lib. If you are unsure about the proper location of a file that may have gotten copied while building the source distribution, consult the C. =end original ¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥óÆâ¤Î¿¤¯¤Î¥Õ¥¡¥¤¥ë¤Ï ÇÉÀ¸Åª¤Ê¤â¤Î¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤ -- ¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë¥Ñ¥Ã¥Á¤òÅö¤Æ¤ë¤³¤È¤ÏÈò¤±¤Æ¤¯¤À¤µ¤¤; ¤Ê¤¼¤Ê¤é¡¢git ¤Ï¤½¤ì¤é¤ËÂФ¹¤ëÊѹ¹¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤º¡¢ ¥Ó¥ë¥É¥×¥í¥»¥¹¤¬¤½¤ì¤é¤ò¾å½ñ¤­¤¹¤ë¤«¤é¤Ç¤¹¡£ Âå¤ï¤ê¤Ë¥ª¥ê¥¸¥Ê¥ë¤Ë¥Ñ¥Ã¥Á¤òÅö¤Æ¤Æ¤¯¤À¤µ¤¤¡£ ¤Û¤È¤ó¤É¤Î¥æ¡¼¥Æ¥£¥ê¥Æ¥£(perldoc ¤Ê¤É)¤Ï¤³¤Î¥«¥Æ¥´¥ê¤Ë¤¢¤ê¤Þ¤¹; ¤¹¤Ê¤ï¤Á¡¢utils/perldoc ¤Ç¤Ï¤Ê¤¯ utils/perldoc.PL ¤Ë¥Ñ¥Ã¥Á¤òÅö¤Æ¤Þ¤¹¡£ ƱÍͤˡ¢$install_root/lib ¤Ë¤¢¤ë¥³¥Ô¡¼¤«¤é $src_root/ext °Ê²¼¤Î¥Õ¥¡¥¤¥ë¤Ë ¥Ñ¥Ã¥Á¤òºîÀ®¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ ¥½¡¼¥¹¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Î¥Ó¥ë¥ÉÃæ¤Ë¥³¥Ô¡¼¤µ¤ì¤¿²ÄǽÀ­¤Î¤¢¤ë¥Õ¥¡¥¤¥ë¤Î ŬÀڤʾì½ê¤¬¤ï¤«¤é¤Ê¤¤¾ì¹ç¤Ï¡¢C ¤òÄ´¤Ù¤Æ¤¯¤À¤µ¤¤¡£ =begin original As a special case, several files are regenerated by 'make regen' if your patch alters C. These are needed for compilation, but are included in the distribution so that you can build perl without needing another perl to generate the files. You must test with these regenerated files, but it is preferred that you instead note that 'make regen is needed' in both the email and the commit message, and submit your patch without them. If you're submitting a series of patches, it might be best to submit the regenerated changes immediately after the source-changes that caused them, so as to have as little effect as possible on the bisectability of your patchset. =end original ÆÃÊ̤ʥ±¡¼¥¹¤È¤·¤Æ¡¢¥Ñ¥Ã¥Á¤¬ C ¤òÊѹ¹¤·¤¿¾ì¹ç¡¢ 'make regen' ¤Ë¤è¤Ã¤Æ¤¤¤¯¤Ä¤«¤Î¥Õ¥¡¥¤¥ë¤¬ºÆÀ¸À®¤µ¤ì¤Þ¤¹¡£ ¤³¤ì¤é¤Ï¥³¥ó¥Ñ¥¤¥ë¤ËɬÍפǤ¹¤¬¡¢¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤¿¤á¤Ë Ê̤Πperl ¤òɬÍפȤ¹¤ë¤³¤È¤Ê¤¯ perl ¤ò¹½ÃۤǤ­¤ë¤è¤¦¤Ë¡¢ ¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤é¤ÎºÆÀ¸À®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Æ¥¹¥È¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤¬¡¢ Âå¤ï¤ê¤ËÅŻҥ᡼¥ë¤È¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤ÎξÊý¤Ë'make regen is needed' ¤È¤¤¤¦ Ãí°Õ¤òÄɲä·¡¢¤½¤ì¤é¤Ê¤·¤Ç¥Ñ¥Ã¥Á¤òÁ÷¿®¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£ °ìÏ¢¤Î¥Ñ¥Ã¥Á¤òÁ÷¿®¤¹¤ë¾ì¹ç¤Ï¡¢¥Ñ¥Ã¥Á¥»¥Ã¥È¤Î bisect ²ÄǽÀ­¤Ø¤Î±Æ¶Á¤ò ¤Ç¤­¤ë¤À¤±¾¯¤Ê¤¯¤¹¤ë¤¿¤á¤Ë¡¢ºÆÀ¸À®¤µ¤ì¤¿Êѹ¹¤ò¤½¤Î¸¶°ø¤È¤Ê¤Ã¤¿ ¥½¡¼¥¹Êѹ¹¤Îľ¸å¤ËÁ÷¿®¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£ =for XXX What should we recommend about binary files now? Do we need anything? =head2 Getting your patch accepted (¤¢¤Ê¤¿¤Î¥Ñ¥Ã¥Á¤ò¼õ¤±Æþ¤ì¤Æ¤â¤é¤¦¤¿¤á¤Ë) =begin original If you are submitting a code patch there are several things that you need to do. =end original ¥³¡¼¥É¥Ñ¥Ã¥Á¤òÁ÷¿®¤¹¤ë¾ì¹ç¤Ï¡¢¤¤¤¯¤Ä¤«¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£ =over 4 =item Commit message =begin original As you craft each patch you intend to submit to the Perl core, it's important to write a good commit message. =end original Perl ¥³¥¢¤ËÅê¹Æ¤·¤è¤¦¤È¤¹¤ë¥Ñ¥Ã¥Á¤òºîÀ®¤¹¤ëºÝ¤Ë¤Ï¡¢ ŬÀڤʥ³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤¹¤ë¤³¤È¤¬½ÅÍפǤ¹¡£ =begin original Your commit message should start with a description of the problem that the patch corrects or new functionality that the patch adds. =end original ¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ï¡¢¥Ñ¥Ã¥Á¤Ë¤è¤Ã¤Æ½¤Àµ¤µ¤ì¤ëÌäÂê¤ÎÀâÌÀ¡¢¤Þ¤¿¤Ï ¥Ñ¥Ã¥Á¤Ë¤è¤Ã¤ÆÄɲ䵤ì¤ë¿·µ¡Ç½¤ÎÀâÌÀ¤«¤é»Ï¤á¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original As a general rule of thumb, your commit message should let a programmer with a reasonable familiarity with the Perl core quickly understand what you were trying to do, how you were trying to do it and why the change matters to Perl. =end original °ìÈÌŪ¤Ê·Ð¸³Â§¤È¤·¤Æ¡¢¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ë¤è¤Ã¤Æ¡¢Perl ¥³¥¢¤Ë¤¢¤ëÄøÅÙ ÀºÄ̤·¤¿¥×¥í¥°¥é¥Þ¡¼¤Ï¡¢²¿¤ò¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¤Î¤«¡¢ ¤É¤Î¤è¤¦¤Ë¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¤Î¤«¡¢¤½¤·¤Æ¤Ê¤¼Êѹ¹¤¬ Perl ¤Ë¤È¤Ã¤Æ ½ÅÍפʤΤ«¤ò¤¹¤°¤ËÍý²ò¤Ç¤­¤ë¤Ï¤º¤Ç¤¹¡£ =over 4 =item What =begin original Your commit message should describe what part of the Perl core you're changing and what you expect your patch to do. =end original ¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ë¤Ï¡¢Perl¥³¥¢¤Î¤É¤ÎÉôʬ¤òÊѹ¹¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¤Î¤«¡¢ ¥Ñ¥Ã¥Á¤Ë²¿¤ò´üÂÔ¤·¤Æ¤¤¤ë¤Î¤«¤òµ­½Ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =item Why =begin original Perhaps most importantly, your commit message should describe why the change you are making is important. When someone looks at your change in six months or six years, your intent should be clear. If you're deprecating a feature with the intent of later simplifying another bit of code, say so. If you're fixing a performance problem or adding a new feature to support some other bit of the core, mention that. =end original ¤ª¤½¤é¤¯ºÇ¤â½ÅÍפʤΤϡ¢¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ë¡¢ ¼«Ê¬¤¬¹Ô¤Ã¤Æ¤¤¤ëÊѹ¹¤¬¤Ê¤¼½ÅÍפʤΤ«¤òµ­½Ò¤¹¤Ù¤­¤À¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ 6 ¥ö·î¤ä6 ǯ¸å¤Ë狼¤¬¤¢¤Ê¤¿¤ÎÊѹ¹¤ò¸«¤¿¤È¤­¡¢ ¤¢¤Ê¤¿¤Î°Õ¿Þ¤ÏÌÀ³Î¤Ç¤¢¤ë¤Ù¤­¤Ç¤¹¡£ ¸å¤ÇÊ̤Υ³¡¼¥É¤òñ½ã²½¤¹¤ë¤¿¤á¤Ëµ¡Ç½¤òÈó¿ä¾©¤Ë¤·¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢ ¤½¤¦½ñ¤¤¤Æ¤¯¤À¤µ¤¤¡£ ¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ÎÌäÂê¤ò½¤Àµ¤·¤¿¤ê¡¢¥³¥¢¤Î¾¤ÎÉôʬ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤¿¤á¤Î ¿·µ¡Ç½¤òÄɲ䷤Ƥ¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¤½¤Î¤³¤È¤Ë¸ÀµÚ¤·¤Æ¤¯¤À¤µ¤¤¡£ =item How =begin original While it's not necessary for documentation changes, new tests or trivial patches, it's often worth explaining how your change works. Even if it's clear to you today, it may not be clear to a porter next month or next year. =end original ʸ½ñ¤ÎÊѹ¹¡¢¿·¤·¤¤¥Æ¥¹¥È¡¢´Êñ¤Ê¥Ñ¥Ã¥Á¤Ê¤É¤Ç¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¤¬¡¢ Êѹ¹¤¬¤É¤Î¤è¤¦¤Ëµ¡Ç½¤¹¤ë¤«¤òÀâÌÀ¤¹¤ë²ÁÃͤ¬¤¢¤ë¤³¤È¤¬¤è¤¯¤¢¤ê¤Þ¤¹¡£ º£Æü¤Ï¤Ï¤Ã¤­¤ê¤·¤Æ¤¤¤Æ¤â¡¢Íè·î¤äÍèǯ¤Ë¤Ï¤Ï¤Ã¤­¤ê¤·¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ =back =begin original A commit message isn't intended to take the place of comments in your code. Commit messages should describe the change you made, while code comments should describe the current state of the code. If you've just implemented a new feature, complete with doc, tests and well-commented code, a brief commit message will often suffice. If, however, you've just changed a single character deep in the parser or lexer, you might need to write a small novel to ensure that future readers understand what you did and why you did it. =end original ¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ï¡¢¥³¡¼¥ÉÆâ¤Î¥³¥á¥ó¥È¤ËÂå¤ï¤ë¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ë¤ÏÊѹ¹ÆâÍƤ¬µ­½Ò¤µ¤ì¡¢¥³¡¼¥É¥³¥á¥ó¥È¤Ë¤Ï¥³¡¼¥É¤Î ¸½ºß¤Î¾õÂÖ¤¬µ­½Ò¤µ¤ì¤Þ¤¹¡£ ¿·µ¡Ç½¤ò¼ÂÁõ¤·¤¿¤Ð¤«¤ê¤Ç¡¢Ê¸½ñ¡¢¥Æ¥¹¥È¡¢¥³¥á¥ó¥ÈÉÕ¤­¤Î¥³¡¼¥É¤¬ ·¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢´Êñ¤Ê¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ç½½Ê¬¤Ê¤³¤È¤¬¤è¤¯¤¢¤ê¤Þ¤¹¡£ ¤¿¤À¤·¡¢¥Ñ¡¼¥µ¤ä»ú¶ç²òÀÏ´ï¤Î±ü¿¼¤¯¤Ë¤¢¤ë 1 ʸ»ú¤òÊѹ¹¤·¤¿¤À¤±¤Î¾ì¹ç¤Ï¡¢ ¾­Íè¤ÎÆɼԤ¬¼«Ê¬¤Î¤·¤¿¤³¤È¤È¤½¤ÎÍýͳ¤ò³Î¼Â¤ËÍý²ò¤Ç¤­¤ë¤è¤¦¤Ë¡¢ û¤¤¾®Àâ¤ò½ñ¤¯É¬Íפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ =item Comments, Comments, Comments (¥³¥á¥ó¥È¡¢¥³¥á¥ó¥È¡¢¥³¥á¥ó¥È) =begin original Be sure to adequately comment your code. While commenting every line is unnecessary, anything that takes advantage of side effects of operators, that creates changes that will be felt outside of the function being patched, or that others may find confusing should be documented. If you are going to err, it is better to err on the side of adding too many comments than too few. =end original ¥³¡¼¥É¤ËŬÀڤʥ³¥á¥ó¥È¤òÉÕ¤±¤ë¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤¹¤Ù¤Æ¤Î¹Ô¤Ë¥³¥á¥ó¥È¤òÉÕ¤±¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¤¬¡¢±é»»»Ò¤ÎÉûºîÍѤòÍøÍѤ¹¤ë¤â¤Î¡¢ ¥Ñ¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤Î³°Éô¤Ç´¶¤¸¤é¤ì¤ëÊѹ¹¤òÀ¸À®¤¹¤ë¤â¤Î¡¢ ¤Þ¤¿¤Ï¾¤Î¿Í¤¬º®Íð¤ò´¶¤¸¤ë²ÄǽÀ­¤Î¤¢¤ë¤â¤Î¤Ï¤¹¤Ù¤Æ ʸ½ñ²½¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ²á¤Á¤òµ¯¤³¤¹¾ì¹ç¤Ï¡¢¥³¥á¥ó¥È¤Î¿ô¤¬¾¯¤Ê¤¹¤®¤ë²á¤Á¤è¤ê¤â¡¢ ¥³¥á¥ó¥È¤Î¿ô¤¬Â¿¤¹¤®¤ë²á¤Á¤ÎÊý¤¬¤Þ¤·¤Ç¤¹¡£ =item Style (¥¹¥¿¥¤¥ë) =begin original In general, please follow the particular style of the code you are patching. =end original °ìÈ̤ˡ¢¥Ñ¥Ã¥Á¤òŬÍѤ¹¤ë¥³¡¼¥É¤ÏÆÃÄê¤Î¥¹¥¿¥¤¥ë¤Ë½¾¤Ã¤Æ¤¯¤À¤µ¤¤¡£ =begin original In particular, follow these general guidelines for patching Perl sources: =end original Æäˡ¢Perl ¥½¡¼¥¹¤Ë¥Ñ¥Ã¥Á¤òŬÍѤ¹¤ë¾ì¹ç¤Ï¡¢¼¡¤Î°ìÈÌŪ¤Ê¥¬¥¤¥É¥é¥¤¥ó¤Ë ½¾¤Ã¤Æ¤¯¤À¤µ¤¤: 8-wide tabs (no exceptions!) 4-wide indents for code, 2-wide indents for nested CPP #defines try hard not to exceed 79-columns ANSI C prototypes uncuddled elses and "K&R" style for indenting control constructs no C++ style (//) comments mark places that need to be revisited with XXX (and revisit often!) opening brace lines up with "if" when conditional spans multiple lines; should be at end-of-line otherwise in function definitions, name starts in column 0 (return value is on previous line) single space after keywords that are followed by parens, no space between function name and following paren avoid assignments in conditionals, but if they're unavoidable, use extra paren, e.g. "if (a && (b = c)) ..." "return foo;" rather than "return(foo);" "if (!foo) ..." rather than "if (foo == FALSE) ..." etc. =item Testsuite (¥Æ¥¹¥È¥¹¥¤¡¼¥È) =begin original If your patch changes code (rather than just changing documentation) you should also include one or more test cases which illustrate the bug you're fixing or validate the new functionality you're adding. In general, you should update an existing test file rather than create a new one. =end original ¥Ñ¥Ã¥Á¤Ë¤è¤Ã¤Æ¥³¡¼¥É¤¬Êѹ¹¤µ¤ì¤¿¾ì¹ç(ñ¤Ê¤ëʸ½ñ¤ÎÊѹ¹¤Ç¤Ï¤Ê¤¯)¡¢ ½¤Àµ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¥Ð¥°¤òÀâÌÀ¤¹¤ë¤«¡¢ Äɲ䷤褦¤È¤·¤Æ¤¤¤ë¿·µ¡Ç½¤ò¸¡¾Ú¤¹¤ë¥Æ¥¹¥È¥±¡¼¥¹¤ò°ì¤Ä°Ê¾å´Þ¤á¤ë ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ °ìÈÌŪ¤Ë¤Ï¡¢¿·¤·¤¤¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ ´û¸¤Î¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ò¹¹¿·¤¹¤ë¤Ù¤­¤Ç¤¹¡£ =begin original Your testsuite additions should generally follow these guidelines (courtesy of Gurusamy Sarathy ): =end original ¥Æ¥¹¥È¥¹¥¤¡¼¥È¤ÎÄɲäϡ¢°ìÈÌŪ¤Ë¼¡¤Î¥¬¥¤¥É¥é¥¤¥ó¤Ë½¾¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹ (Gurusamy Sarthy ¤Ë¤è¤ë): Know what you're testing. Read the docs, and the source. Tend to fail, not succeed. Interpret results strictly. Use unrelated features (this will flush out bizarre interactions). Use non-standard idioms (otherwise you are not testing TIMTOWTDI). Avoid using hardcoded test numbers whenever possible (the EXPECTED/GOT found in t/op/tie.t is much more maintainable, and gives better failure reports). Give meaningful error messages when a test fails. Avoid using qx// and system() unless you are testing for them. If you do use them, make sure that you cover _all_ perl platforms. Unlink any temporary files you create. Promote unforeseen warnings to errors with $SIG{__WARN__}. Be sure to use the libraries and modules shipped with the version being tested, not those that were already installed. Add comments to the code explaining what you are testing for. Make updating the '1..42' string unnecessary. Or make sure that you update it. Test _all_ behaviors of a given operator, library, or function: - All optional arguments - Return values in various contexts (boolean, scalar, list, lvalue) - Use both global and lexical variables - Don't forget the exceptional, pathological cases. =back =head1 ACCEPTING A PATCH (¥Ñ¥Ã¥Á¤ò¼õ¤±Æþ¤ì¤ë) =begin original If you have received a patch file generated using the above section, you should try out the patch. =end original Á°½Ò¤ÎÀá¤Ç¤ò»È¤Ã¤ÆÀ¸À®¤µ¤ì¤¿¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë¤ò¼õ¤±¼è¤Ã¤¿¾ì¹ç¤Ï¡¢ ¥Ñ¥Ã¥Á¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ =begin original First we need to create a temporary new branch for these changes and switch into it: =end original ¤Þ¤º¡¢¤³¤ì¤é¤ÎÊѹ¹¤Î¤¿¤á¤Î°ì»þŪ¤Ê¿·¤·¤¤¥Ö¥é¥ó¥Á¤òºîÀ®¤·¡¢¤½¤Î¥Ö¥é¥ó¥Á¤Ë ÀÚ¤êÂؤ¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹: % git checkout -b experimental =begin original Patches that were formatted by C are applied with C: =end original C ¤Ç¥Õ¥©¡¼¥Þ¥Ã¥È¤µ¤ì¤¿¥Ñ¥Ã¥Á¤Ï¡¢C ¤ÇŬÍѤµ¤ì¤Þ¤¹: % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch Applying Rename Leon Brocard to Orange Brocard =begin original If just a raw diff is provided, it is also possible use this two-step process: =end original À¸¤Î diff ¤À¤±¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¼¡¤Î 2 Ãʳ¬¤Î¥×¥í¥»¥¹¤ò »ÈÍѤ¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹: % git apply bugfix.diff % git commit -a -m "Some fixing" --author="That Guy " =begin original Now we can inspect the change: =end original ¤³¤³¤ÇÊѹ¹¤ò¸¡ºº¤Ç¤­¤Þ¤¹: % git show HEAD commit b1b3dab48344cff6de4087efca3dbd63548ab5e2 Author: Leon Brocard Date: Fri Dec 19 17:02:59 2008 +0000 Rename Leon Brocard to Orange Brocard 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 =begin original 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: =end original ¤â¤·¤¢¤Ê¤¿¤¬ Perl ¤Î¥³¥ß¥Ã¥¿¤Ç¡¢¥Ñ¥Ã¥Á¤¬Îɤ¤¤â¤Î¤À¤È»×¤¦¤Ê¤é¡¢ ¤½¤ì¤ò blead ¤Ë¥Þ¡¼¥¸¤·¤Æ¥á¥¤¥ó¤Î¥ê¥Ý¥¸¥È¥ê¤Ë¥×¥Ã¥·¥å¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹: % git checkout blead % git merge experimental % git push =begin original If you want to delete your temporary branch, you may do so with: =end original °ì»þŪ¤Ê¥Ö¥é¥ó¥Á¤òºï½ü¤·¤¿¤¤¤Ê¤é¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ç¤­¤Þ¤¹: % 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. =head1 CLEANING A WORKING DIRECTORY (ºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤òÁݽü¤¹¤ë) =begin original The command C can with varying arguments be used as a replacement for C. =end original C ¥³¥Þ¥ó¥É¤Ï¤µ¤Þ¤¶¤Þ¤Ê°ú¿ô¤Ç C ¤ÎÂå¤ï¤ê¤Ë »È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ =begin original To reset your working directory to a pristine condition you can do: =end original ºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤ò½é´ü¾õÂ֤˥ꥻ¥Ã¥È¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹: % git clean -dxf =begin original However, be aware this will delete ALL untracked content. You can use =end original ¤¿¤À¤·¡¢¤³¤ì¤Ë¤è¤ê¤¹¤Ù¤Æ¤ÎÄÉÀפµ¤ì¤Æ¤¤¤Ê¤¤¥³¥ó¥Æ¥ó¥Ä¤¬ºï½ü¤µ¤ì¤Þ¤¹¡£ ¼¡¤Î¤è¤¦¤Ë¤¹¤ë¤È: % git clean -Xf =begin original to remove all ignored untracked files, such as build and test byproduct, but leave any manually created files alone. =end original ¥Ó¥ë¥É¤ä¥Æ¥¹¥È¤ÎÉû»ºÊª¤Ê¤É¡¢¤¹¤Ù¤Æ¤Î̵»ë¤µ¤ì¤¿ ÄÉÀפµ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤Þ¤¹¡£ ¤¿¤À¤·¡¢¼êÆ°¤ÇºîÀ®¤·¤¿¥Õ¥¡¥¤¥ë¤Ï»Ä¤·¤Þ¤¹¡£ =begin original If you only want to cancel some uncommitted edits, you can use C and give it a list of files to be reverted, or C to revert them all. =end original ¥³¥ß¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÔ½¸¤À¤±¤ò¥­¥ã¥ó¥»¥ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ C ¤ò»ÈÍѤ·¤Æ¸µ¤ËÌ᤹¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤òÍ¿¤¨¤ë¤«¡¢ C ¤ò»ÈÍѤ·¤Æ¤¹¤Ù¤Æ¤ò¸µ¤ËÌ᤹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ =begin original If you want to cancel one or several commits, you can use C. =end original 1¤Ä¤Þ¤¿¤ÏÊ£¿ô¤Î¥³¥ß¥Ã¥È¤ò¥­¥ã¥ó¥»¥ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢C ¤ò »È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ =head1 BISECTING (bisect) =begin original C provides a built-in way to determine, with a binary search in the history, which commit should be blamed for introducing a given bug. =end original C ¤Ë¤Ï¡¢ÍúÎò¤ÎÆóʬ¸¡º÷¤ò»È¤Ã¤Æ¡¢¤É¤Î¥³¥ß¥Ã¥È¤¬ÆÃÄê¤Î¥Ð¥°¤ò °ú¤­µ¯¤³¤·¤¿¤ÈÈóÆñ¤µ¤ì¤ë¤Ù¤­¤«¤òȽÃǤ¹¤ë¼êÃʤ¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ =begin original Suppose that we have a script F<~/testcase.pl> that exits with C<0> when some behaviour is correct, and with C<1> when it's faulty. You need an helper script that automates building C and running the testcase: =end original ¥¹¥¯¥ê¥×¥È F<~/testcase.pl> ¤¬¤¢¤ê¡¢Æ°ºî¤¬Àµ¤·¤¤¾ì¹ç¤Ï C<0> ¤Ç½ªÎ»¤·¡¢ Æ°ºî¤¬Àµ¤·¤¯¤Ê¤¤¾ì¹ç¤Ï C<1> ¤Ç½ªÎ»¤¹¤ë¤È¤·¤Þ¤¹¡£ C ¤Î¹½Ãۤȥƥ¹¥È¥±¡¼¥¹¤Î¼Â¹Ô¤ò¼«Æ°²½¤¹¤ë¥Ø¥ë¥Ñ¡¼¥¹¥¯¥ê¥×¥È¤¬É¬ÍפǤ¹: % cat ~/run #!/bin/sh git clean -dxf # If you can use ccache, add -Dcc=ccache\ gcc -Dld=gcc to the Configure line # if Encode is not needed for the test, you can speed up the bisect by # excluding it from the runs with -Dnoextensions=Encode sh Configure -des -Dusedevel -Doptimize="-g" test -f config.sh || exit 125 # Correct makefile for newer GNU gcc perl -ni -we 'print unless /<(?:built-in|command)/' makefile x2p/makefile # if you just need miniperl, replace test_prep with miniperl make -j4 test_prep [ -x ./perl ] || exit 125 ./perl -Ilib ~/testcase.pl ret=$? [ $ret -gt 127 ] && ret=127 git clean -dxf exit $ret =begin original This script may return C<125> to indicate that the corresponding commit should be skipped. Otherwise, it returns the status of F<~/testcase.pl>. =end original ¤³¤Î¥¹¥¯¥ê¥×¥È¤Ï¡¢Âбþ¤¹¤ë¥³¥ß¥Ã¥È¤ò¥¹¥­¥Ã¥×¤¹¤ë¤³¤È¤ò¼¨¤¹ C<125> ¤ò ÊÖ¤¹¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£ ¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢F<~/testcase.pl>¤Î¥¹¥Æ¡¼¥¿¥¹¤òÊÖ¤·¤Þ¤¹¡£ =begin original You first enter in bisect mode with: =end original ¤Þ¤º bisect ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤¹: % git bisect start =begin original For example, if the bug is present on C but wasn't in 5.10.0, C will learn about this when you enter: =end original Î㤨¤Ð¡¢¥Ð¥°¤¬ C ¤Ë¤¢¤Ã¤Æ¤â 5.10.0 ¤Ë¤Ï¤Ê¤«¤Ã¤¿¾ì¹ç¡¢C ¤Ï °Ê²¼¤Î¤è¤¦¤ËÆþÎϤ¹¤ë¤³¤È¤Ç¤³¤ì¤ò³Ø½¬¤·¤Þ¤¹: % git bisect bad % git bisect good perl-5.10.0 Bisecting: 853 revisions left to test after this =begin original This results in checking out the median commit between C and C. You can then run the bisecting process with: =end original ¤³¤Î·ë²Ì¡¢C ¤È C ¤ÎÃæ´Ö¤Î¥³¥ß¥Ã¥È¤¬ ¥Á¥§¥Ã¥¯¥¢¥¦¥È¤µ¤ì¤Þ¤¹¡£ ¼¡¤Î¤è¤¦¤Ë¤·¤Æ bisect ½èÍý¤ò¼Â¹Ô¤·¤Þ¤¹: % git bisect run ~/run =begin original When the first bad commit is isolated, C will tell you so: =end original ºÇ½é¤ÎÉÔÀµ¤Ê¥³¥ß¥Ã¥È¤¬Ê¬Î¥¤µ¤ì¤ë¤È¡¢C ¤Ï¼¡¤Î¤è¤¦¤Ë¸À¤¤¤Þ¤¹: ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 is first bad commit commit ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 Author: Dave Mitchell Date: Sat Feb 9 14:56:23 2008 +0000 [perl #49472] Attributes + Unknown Error ... bisect run success =begin original You can peek into the bisecting process with C and C. C will get you out of bisect mode. =end original C ¤È C ¤Ç bisect ½èÍý¤ò ÇÁ¤­¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ C¤Ï bisect ¥â¡¼¥É¤ò²ò½ü¤·¤Þ¤¹¡£ =begin original Please note that the first C state must be an ancestor of the first C state. If you want to search for the commit that I some bug, you have to negate your test case (i.e. exit with C<1> if OK and C<0> if not) and still mark the lower bound as C and the upper as C. The "first bad commit" has then to be understood as the "first commit where the bug is solved". =end original ºÇ½é¤Î C ¾õÂ֤ϡ¢ºÇ½é¤Î C ¾õÂÖ¤ÎÁÄÀè¤Ç¤¢¤ëɬÍפ¬¤¢¤ë¤³¤È¤Ë Ãí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ²¿¤é¤«¤Î¥Ð¥°¤ò I<²ò·è¤·¤¿> ¥³¥ß¥Ã¥È¤ò¸¡º÷¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥Æ¥¹¥È¥±¡¼¥¹¤ò ȿž¤µ¤»¡¢ (¤Ä¤Þ¤ê¡¢OK ¤Ê¤é C<1> ¤Ç½ªÎ»¤·¡¢¤½¤¦¤Ç¤Ê¤¤¤Ê¤é C<0> ¤Ç½ªÎ»¤¹¤ë)¡¢ ²¼¸Â¤ò C¡¢¾å¸Â¤ò C ¤È¥Þ¡¼¥¯¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¡ÖºÇ½é¤ÎÉÔÀµ¤Ê¥³¥ß¥Ã¥È¡×¤Ï¡¢¡Ö¥Ð¥°¤¬²ò·è¤µ¤ì¤¿ºÇ½é¤Î¥³¥ß¥Ã¥È¡×¤È ²ò¼á¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original C has much more information on how you can tweak your binary searches. =end original C ¤Ë¤Ï¡¢Æóʬõº÷¤òÈùÄ´À°¤¹¤ëÊýË¡¤Ë´Ø¤¹¤ë¾ðÊó¤¬Ë­ÉÙ¤Ë ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ =head1 SUBMITTING A PATCH VIA GITHUB (GitHub ·Ðͳ¤Ç¥Ñ¥Ã¥Á¤òÅê¹Æ¤¹¤ë) =begin original GitHub is a website that makes it easy to fork and publish projects with Git. First you should set up a GitHub account and log in. =end original GitHub ¤Ï¡¢Git ¤Ç¥×¥í¥¸¥§¥¯¥È¤ò¥Õ¥©¡¼¥¯¤·¤Æ¸ø³«¤¹¤ë¤³¤È¤òÍưפˤ¹¤ë ¥¦¥§¥Ö¥µ¥¤¥È¤Ç¤¹¡£ ¤Þ¤º¡¢GitHub ¥¢¥«¥¦¥ó¥È¤òÀßÄꤷ¤Æ¥í¥°¥¤¥ó¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original Perl's git repository is mirrored on GitHub at this page: =end original Perl ¤Î git ¥ê¥Ý¥¸¥È¥ê¤Ï GitHub ¤Î¤³¤Î¥Ú¡¼¥¸¤Ë¥ß¥é¡¼¥ê¥ó¥°¤µ¤ì¤Æ¤¤¤Þ¤¹: http://github.com/mirrors/perl/tree/blead =begin original Visit the page and click the "fork" button. This clones the Perl git repository for you and provides you with "Your Clone URL" from which you should clone: =end original ¤³¤Î¥Ú¡¼¥¸¤Ë¥¢¥¯¥»¥¹¤·¤Æ¡¢"fork"¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤³¤ì¤Ï Perl git ¥ê¥Ý¥¸¥È¥ê¤ò¥¯¥í¡¼¥ó¤·¡¢¥¯¥í¡¼¥ó¸µ¤Î "Your Clone URL" ¤ò Ä󶡤·¤Þ¤¹: % git clone git@github.com:USERNAME/perl.git perl-github =begin original The same patch as above, using github might look like this: =end original Á°½Ò¤ÈƱ¤¸¥Ñ¥Ã¥Á¤Ç¡¢github ¤ò»È¤¦¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹: % cd perl-github % git remote add upstream git://perl5.git.perl.org/perl.git % git pull upstream blead % git checkout -b orange % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS % git commit -a -m 'Rename Leon Brocard to Orange Brocard' % git push origin orange =begin original The orange branch has been pushed to GitHub, so you should now send an email to perl5-porters@perl.org with a description of your changes and the following information: =end original orange ¥Ö¥é¥ó¥Á¤Ï GitHub ¤Ë¥×¥Ã¥·¥å¤µ¤ì¤¿¤Î¤Ç¡¢perl5-porters@perl.org ¤Ë Êѹ¹ÆâÍƤª¤è¤Ó°Ê²¼¤Î¾ðÊó¤ò¥á¡¼¥ëÁ÷¿®¤·¤Æ¤¯¤À¤µ¤¤: http://github.com/USERNAME/perl/tree/orange git@github.com:USERNAME/perl.git branch orange =head1 MERGING FROM A BRANCH VIA GITHUB (GitHub ·Ðͳ¤Î¥Ö¥é¥ó¥Á¤ò¥Þ¡¼¥¸¤¹¤ë) =begin original If someone has provided a branch via GitHub and you are a committer, you should use the following in your perl-ssh directory: =end original 狼¤¬ GitHub ·Ðͳ¤Ç¥Ö¥é¥ó¥Á¤òÄ󶡤·¤Æ¤ª¤ê¡¢¤¢¤Ê¤¿¤¬¥³¥ß¥Ã¥¿¤Ç¤¢¤ë¾ì¹ç¡¢ perl-ssh ¥Ç¥£¥ì¥¯¥È¥ê¤Ç°Ê²¼¤ò»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹: % git remote add dandv git://github.com/dandv/perl.git % git fetch dandv =begin original Now you can see the differences between the branch and blead: =end original ¤³¤ì¤Ç¡¢¤½¤Î¥Ö¥é¥ó¥Á¤È blead ¤Îº¹Ê¬¤ò¸«¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿: % git diff dandv/blead =begin original And you can see the commits: =end original ¤½¤·¤Æ¥³¥ß¥Ã¥È¤òɽ¼¨¤Ç¤­¤Þ¤¹: % git log dandv/blead =begin original If you approve of a specific commit, you can cherry pick it: =end original ÆÃÄê¤Î¥³¥ß¥Ã¥È¤ò¾µÇ§¤¹¤ë¾ì¹ç¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤·¤ÆÁªÂò¤Ç¤­¤Þ¤¹: % git cherry-pick 3adac458cb1c1d41af47fc66e67b49c8dec2323f =begin original Or you could just merge the whole branch if you like it all: =end original ¤Þ¤¿¤Ï¡¢É¬Íפ˱þ¤¸¤Æ¥Ö¥é¥ó¥ÁÁ´ÂΤò¥Þ¡¼¥¸¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹: % git merge dandv/blead =begin original And then push back to the repository: =end original ¤½¤·¤Æ¡¢¥ê¥Ý¥¸¥È¥ê¤Ë¥×¥Ã¥·¥å¥Ð¥Ã¥¯¤·¤Þ¤¹: % git push =head1 TOPIC BRANCHES AND REWRITING HISTORY (¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤ÈÍúÎò¤Î½ñ¤­´¹¤¨) =begin original Individual committers should create topic branches under B/B. Other committers should check with a topic branch's creator before making any change to it. =end original ¸Ä¡¹¤Î¥³¥ß¥Ã¥¿¡¼¤Ï¡¢B/B ¤Î²¼¤Ë¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¾¤Î¥³¥ß¥Ã¥¿¡¼¤Ï¡¢¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤ËÊѹ¹¤ò²Ã¤¨¤ëÁ°¤Ë¡¢¤½¤ÎºîÀ®¼Ô¤Ë ³Îǧ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ =begin original The simplest way to create a remote topic branch that works on all versions of git is to push the current head as a new branch on the remote, then check it out locally: =end original ¤¹¤Ù¤Æ¤Î¥Ð¡¼¥¸¥ç¥ó¤Î git ¤ÇÆ°ºî¤¹¤ë¡¢¥ê¥â¡¼¥È¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤òºîÀ®¤¹¤ë ºÇ¤â´Êñ¤ÊÊýË¡¤Ï¡¢¸½ºß¤Î head ¤ò¥ê¥â¡¼¥È¤Î¿·¤·¤¤¥Ö¥é¥ó¥Á¤È¤·¤Æ¥×¥Ã¥·¥å¤·¡¢ ¥í¡¼¥«¥ë¤Ç¥Á¥§¥Ã¥¯¥¢¥¦¥È¤¹¤ë¤³¤È¤Ç¤¹¡£ $ branch="$yourname/$some_descriptive_name" $ git push origin HEAD:$branch $ git checkout -b $branch origin/$branch =begin original Users of git 1.7 or newer can do it in a more obvious manner: =end original git 1.7 °Ê¹ß¤Î¥æ¡¼¥¶¤Ï¡¢¤â¤Ã¤ÈÌÀ¤é¤«¤ÊÊýË¡¤ò»È¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹: $ branch="$yourname/$some_descriptive_name" $ git checkout -b $branch $ git push origin -u $branch =begin original If you are not the creator of B/B, you might sometimes find that the original author has edited the branch's history. There are lots of good reasons for this. Sometimes, an author might simply be rebasing the branch onto a newer source point. Sometimes, an author might have found an error in an early commit which they wanted to fix before merging the branch to blead. =end original B/B ¤ÎºîÀ®¼Ô¤Ç¤Ê¤¤¾ì¹ç¡¢¸µ¤ÎºîÀ®¼Ô¤¬ ¥Ö¥é¥ó¥Á¤ÎÍúÎò¤òÊÔ½¸¤·¤¿¤³¤È¤Ëµ¤ÉÕ¤¯¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤Ë¤Ï¿¤¯¤ÎÀµÅö¤ÊÍýͳ¤¬¤¢¤ê¤Þ¤¹¡£ ¾ì¹ç¤Ë¤è¤Ã¤Æ¤Ï¡¢Ã±¤Ë¥Ö¥é¥ó¥Á¤ò¿·¤·¤¤¥½¡¼¥¹¥Ý¥¤¥ó¥È¤Ë´ð¤Å¤¤¤Æ ºî¤êľ¤¹¤³¤È¤Ë¤Ê¤ë¤³¤È¤â¤¢¤ê¤Þ¤¹¡£ ¾ì¹ç¤Ë¤è¤Ã¤Æ¤Ï¡¢¥Ö¥é¥ó¥Á¤ò blead ¤Ë¥Þ¡¼¥¸¤¹¤ëÁ°¤Ë¡¢ ½é´ü¤Î¥³¥ß¥Ã¥È¤Ç½¤Àµ¤·¤¿¤¤¥¨¥é¡¼¤ò¸«¤Ä¤±¤¿¤³¤È¤â¤¢¤ê¤Þ¤¹¡£ =begin original Currently the master repository is configured to forbid non-fast-forward merges. This means that the branches within can not be rebased and pushed as a single step. =end original ¸½ºß¡¢¥Þ¥¹¥¿¡¼¥ê¥Ý¥¸¥È¥ê¤Ï¡¢Èó fast-forward ¤Î¥Þ¡¼¥¸¤ò¶Ø»ß¤¹¤ë¤è¤¦¤Ë ¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤Ï¡¢Ãæ¤Î¥Ö¥é¥ó¥Á¤Ï¥ê¥Ù¡¼¥¹¤È¥×¥Ã¥·¥å¤òñ°ì¥¹¥Æ¥Ã¥×¤È¤·¤Æ¤Ï ¤Ç¤­¤Ê¤¤¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£ =begin original The only way you will ever be allowed to rebase or modify the history of a pushed branch is to delete it and push it as a new branch under the same name. Please think carefully about doing this. It may be better to sequentially rename your branches so that it is easier for others working with you to cherry-pick their local changes onto the new version. (XXX: needs explanation). =end original ¥×¥Ã¥·¥å¤µ¤ì¤¿¥Ö¥é¥ó¥Á¤ÎÍúÎò¤òºÆ¼èÆÀ¤Þ¤¿¤ÏÊѹ¹¤¹¤ëÍ£°ì¤ÎÊýË¡¤Ï¡¢ ¤½¤Î¥Ö¥é¥ó¥Á¤òºï½ü¤·¡¢Æ±¤¸Ì¾Á°¤Ç¿·¤·¤¤¥Ö¥é¥ó¥Á¤È¤·¤Æ¥×¥Ã¥·¥å¤¹¤ë¤³¤È¤Ç¤¹¡£ ¤³¤ì¤ò¹Ô¤¦¤³¤È¤Ë¤Ä¤¤¤Æ¤Ï¿µ½Å¤Ë¸¡Æ¤¤·¤Æ¤¯¤À¤µ¤¤¡£ ¾¤Î¥æ¡¼¥¶¡¼¤¬¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Ë¥í¡¼¥«¥ë¤ÎÊѹ¹¤ò´Êñ¤Ë ¥Á¥§¥ê¡¼¥Ô¥Ã¥¯¤Ç¤­¤ë¤è¤¦¤Ë¡¢ ¥Ö¥é¥ó¥Á¤Î̾Á°¤ò½çÈÖ¤ËÊѹ¹¤·¤¿Êý¤¬¤è¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹(XXX:ÀâÌÀ¤¬É¬Í×)¡£ =begin original If you want to rebase a personal topic branch, you will have to delete your existing topic branch and push as a new version of it. You can do this via the following formula (see the explanation about C's in the git push documentation for details) after you have rebased your branch: =end original ¸Ä¿ÍŪ¤Ê¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤ò¥ê¥Ù¡¼¥¹¤·¤¿¤¤¾ì¹ç¤Ï¡¢ ´û¸¤Î¥È¥Ô¥Ã¥¯¥Ö¥é¥ó¥Á¤òºï½ü¤·¡¢¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤È¤·¤Æ ¥×¥Ã¥·¥å¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤Ï¡¢¥Ö¥é¥ó¥Á¤ò¥ê¥Ù¡¼¥¹¤·¤¿¸å¡¢¼¡¤Î¸ø¼° (¾ÜºÙ¤Ï git push ʸ½ñ¤Î C ¤Ë´Ø¤¹¤ëÀâÌÀ¤ò»²¾È)¤Ç¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ # first rebase $ git checkout $user/$topic $ git fetch $ git rebase origin/blead # then "delete-and-push" $ git push origin :$user/$topic $ git push origin $user/$topic =begin original B it is forbidden at the repository level to delete any of the "primary" branches. That is any branch matching C. Any attempt to do so will result in git producing an error like this: =end original B<Ãí°Õ:> ¥ê¥Ý¥¸¥È¥ê¥ì¥Ù¥ë¤Ç"¥×¥é¥¤¥Þ¥ê"¥Ö¥é¥ó¥Á¤òºï½ü¤¹¤ë¤³¤È¤Ï ¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤Ï C ¤Ë¥Þ¥Ã¥Á¥ó¥°¤¹¤ë¥Ö¥é¥ó¥Á¤Ç¤¹¡£ ºï½ü¤·¤è¤¦¤È¤¹¤ë¤È¡¢git¤Ï¼¡¤Î¤è¤¦¤Ê¥¨¥é¡¼¤òÀ¸À®¤·¤Þ¤¹: $ git push origin :blead *** It is forbidden to delete blead/maint branches in this repository error: hooks/update exited with error code 1 error: hook declined to update refs/heads/blead To ssh://perl5.git.perl.org/perl ! [remote rejected] blead (hook declined) error: failed to push some refs to 'ssh://perl5.git.perl.org/perl' =begin original As a matter of policy we do B edit the history of the blead and maint-* branches. If a typo (or worse) sneaks into a commit to blead or maint-*, we'll fix it in another commit. The only types of updates allowed on these branches are "fast-forward's", where all history is preserved. =end original ¥Ý¥ê¥·¡¼¤È¤·¤Æ¡¢blead ¥Ö¥é¥ó¥Á¤È maint-* ¥Ö¥é¥ó¥Á¤ÎÍúÎò¤ÏÊÔ½¸ B<¤·¤Þ¤»¤ó>¡£ ¥¿¥¤¥×¥ß¥¹(¤Þ¤¿¤Ï¤½¤ì°Ê¾å)¤¬ blead ¤Þ¤¿¤Ï maint-* ¤Ø¤Î¥³¥ß¥Ã¥È¤Ë Ǧ¤Ó¹þ¤ó¤À¾ì¹ç¤Ï¡¢Ê̤Υ³¥ß¥Ã¥È¤Ç½¤Àµ¤·¤Þ¤¹¡£ ¤³¤ì¤é¤Î¥Ö¥é¥ó¥Á¤Çµö²Ä¤µ¤ì¤Æ¤¤¤ë¹¹¿·¤Î¥¿¥¤¥×¤Ï "fast-forward" ¤À¤±¤Ç¡¢ ¤¹¤Ù¤Æ¤ÎÍúÎò¤¬Êݸ¤µ¤ì¤Þ¤¹¡£ =begin original Annotated tags in the canonical perl.git repository will never be deleted or modified. Think long and hard about whether you want to push a local tag to perl.git before doing so. (Pushing unannotated tags is not allowed.) =end original ɸ½àŪ¤Ê perl.git ¥ê¥Ý¥¸¥È¥êÆâ¤ÎÃí¼áÉÕ¤­¥¿¥°¤Ï¡¢ºï½ü¤ä Êѹ¹¤µ¤ì¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¥í¡¼¥«¥ë¥¿¥°¤ò perl.git ¤Ë¥×¥Ã¥·¥å¤¹¤ëÁ°¤Ë¡¢¤¸¤Ã¤¯¤ê¹Í¤¨¤Æ¤ß¤Æ¤¯¤À¤µ¤¤ (Ãí¼á¤Ê¤·¥¿¥°¤Î¥×¥Ã¥·¥å¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó)¡£ =head1 COMMITTING TO MAINTENANCE VERSIONS (¥á¥ó¥Æ¥Ê¥ó¥¹¥Ð¡¼¥¸¥ç¥ó¤Ë¥³¥ß¥Ã¥È¤¹¤ë) =begin original Maintenance versions should only be altered to add critical bug fixes. =end original ¥á¥ó¥Æ¥Ê¥ó¥¹¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢½ÅÍפʥХ°½¤Àµ¤òÄɲ乤ë¾ì¹ç¤Ë¤Î¤ßÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£ =begin original To commit to a maintenance version of perl, you need to create a local tracking branch: =end original perl ¤Î¥á¥ó¥Æ¥Ê¥ó¥¹¥Ð¡¼¥¸¥ç¥ó¤Ë¥³¥ß¥Ã¥È¤¹¤ë¤Ë¤Ï¡¢ ¥í¡¼¥«¥ëÄÉÀ×¥Ö¥é¥ó¥Á¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ % git checkout --track -b maint-5.005 origin/maint-5.005 =begin original This creates a local branch named C, which tracks the remote branch C. Then you can pull, commit, merge and push as before. =end original ¤³¤ì¤Ë¤è¤ê¡¢¥ê¥â¡¼¥È¥Ö¥é¥ó¥Á C ¤òÄÉÀפ¹¤ë C ¤È¤¤¤¦Ì¾Á°¤Î¥í¡¼¥«¥ë¥Ö¥é¥ó¥Á¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ ¼¡¤Ë¡¢°ÊÁ°¤ÈƱ¤¸¤è¤¦¤Ë¥×¥ë¡¢¥³¥ß¥Ã¥È¡¢¥Þ¡¼¥¸¡¢¥×¥Ã¥·¥å¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ =begin original You can also cherry-pick commits from blead and another branch, by using the C command. It is recommended to use the B<-x> option to C in order to record the SHA1 of the original commit in the new commit message. =end original C ¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Æ¡¢blead ¤ÈÊ̤Υ֥é¥ó¥Á¤«¤é ¥³¥ß¥Ã¥È¤ò¥Á¥§¥ê¡¼¥Ô¥Ã¥¯¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ ¸µ¤Î¥³¥ß¥Ã¥È¤Î SHA1 ¤ò¿·¤·¤¤¥³¥ß¥Ã¥È¥á¥Ã¥»¡¼¥¸¤Ëµ­Ï¿¤¹¤ë¤¿¤á¤Ë¡¢ C ¤Ë B<-x> ¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤³¤È¤ò´«¤á¤Þ¤¹¡£ =head1 GRAFTS =begin original The perl history contains one mistake which was not caught in the conversion: a merge was recorded in the history between blead and maint-5.10 where no merge actually occurred. Due to the nature of git, this is now impossible to fix in the public repository. You can remove this mis-merge locally by adding the following line to your C<.git/info/grafts> file: =end original PerlÍúÎò¤Ë¤Ï¡¢ÊÑ´¹¤Ç¸¡½Ð¤µ¤ì¤Ê¤«¤Ã¤¿¸í¤ê¤¬°ì¤Ä´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹: blead ¤È maint-5.10 ¤Î´Ö¤ÎÍúÎò¤Ë¥Þ¡¼¥¸¤¬µ­Ï¿¤µ¤ì¤Þ¤·¤¿¤¬¡¢ ¼ÂºÝ¤Ë¤Ï¥Þ¡¼¥¸¤ÏȯÀ¸¤·¤Þ¤»¤ó¤Ç¤·¤¿¡£ git ¤ÎÀ­¼Á¾å¡¢¥Ñ¥Ö¥ê¥Ã¥¯¥ê¥Ý¥¸¥È¥ê¤Ç½¤Àµ¤¹¤ë¤³¤È¤Ï¸½ºßÉÔ²Äǽ¤Ç¤¹¡£ C<.git/info/graft> ¥Õ¥¡¥¤¥ë¤Ë¼¡¤Î¹Ô¤òÄɲ乤뤳¤È¤Ç¡¢ ¤³¤Î¸í¤Ã¤¿¥Þ¡¼¥¸¤ò¥í¡¼¥«¥ë¤Çºï½ü¤Ç¤­¤Þ¤¹¡£ 296f12bbbbaa06de9be9d09d3dcf8f4528898a49 434946e0cb7a32589ed92d18008aaa1d88515930 =begin original It is particularly important to have this graft line if any bisecting is done in the area of the "merge" in question. =end original ÌäÂê¤Î¡Ö¥Þ¡¼¥¸¡×Îΰè¤Ç bisect ¤¬¹Ô¤ï¤ì¤ë¾ì¹ç¡¢¤³¤Î graft ¹Ô¤ò »ØÄꤹ¤ë¤³¤È¤¬Æä˽ÅÍפǤ¹¡£ =head1 SEE ALSO =begin original The git documentation, accessible via C. =end original C ¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤ë git ʸ½ñ¡£ =begin meta Translate: SHIRAKATA Kentaro Status: completed =end meta