perlgit > 5.16.1 との差分

perlgit 5.16.1 と 5.24.1 の差分

11
22=encoding utf8
33
44=for comment
55Consistent formatting of this file is achieved with:
66 perl ./Porting/podtidy pod/perlgit.pod
77
88=head1 NAME
99
1010=begin original
1111
1212perlgit - Detailed information about git and the Perl repository
1313
1414=end original
1515
1616perlgit - git と Perl リポジトリに関する詳細情報
1717
1818=head1 DESCRIPTION
1919
2020=begin original
2121
2222This document provides details on using git to develop Perl. If you are
2323just interested in working on a quick patch, see L<perlhack> first.
2424This document is intended for people who are regular contributors to
2525Perl, including those with write access to the git repository.
2626
2727=end original
2828
2929この文書は、Perl を開発するために git を使う詳細を提供します。
3030単に簡単なパッチに対して作業することに興味があるなら、
3131まず L<perlhack> を参照してください。
3232この文書は、git リポジトリへの書き込みアクセスを持つ人々を含む、
3333Perl の定期的な貢献者である人々のためを意図しています。
3434
3535=head1 CLONING THE REPOSITORY
3636
3737(リポジトリをクローンする)
3838
3939=begin original
4040
4141All of Perl's source code is kept centrally in a Git repository at
4242I<perl5.git.perl.org>.
4343
4444=end original
4545
4646Perlのソースコードはすべて、I<perl5.git.perl.org> の Git リポジトリに
4747集中管理されています。
4848
4949=begin original
5050
5151You can make a read-only clone of the repository by running:
5252
5353=end original
5454
5555これを実行することでリポジトリの読み込み専用のクローンを作ることができます:
5656
5757 % git clone git://perl5.git.perl.org/perl.git perl
5858
5959=begin original
6060
6161This uses the git protocol (port 9418).
6262
6363=end original
6464
6565これは git プロトコル (ポート 9418) を使います。
6666
6767=begin original
6868
6969If you cannot use the git protocol for firewall reasons, you can also
7070clone via http, though this is much slower:
7171
7272=end original
7373
7474ファイアウォールの関係で git プロトコルが使えない場合、
7575http 経由でもクローンできますが、はるかに遅いです:
7676
7777 % git clone http://perl5.git.perl.org/perl.git perl
7878
7979=head1 WORKING WITH THE REPOSITORY
8080
8181(リポジトリでの作業)
8282
8383=begin original
8484
8585Once you have changed into the repository directory, you can inspect
8686it. After a clone the repository will contain a single local branch,
8787which will be the current branch as well, as indicated by the asterisk.
8888
8989=end original
9090
9191リポジトリディレクトリに変更を加えたら、そのディレクトリを検査できます。
9292クローン作成後、リポジトリには単一のローカルブランチが含まれます。
9393このローカルブランチは、アスタリスクで示されているように、
9494現在のブランチにもなります。
9595
9696 % git branch
9797 * blead
9898
9999=begin original
100100
101101Using the -a switch to C<branch> will also show the remote tracking
102102branches in the repository:
103103
104104=end original
105105
106106C<branch> に -a スイッチを使用すると、リポジトリ内の
107107リモート追跡ブランチも表示されます:
108108
109109 % git branch -a
110110 * blead
111111 origin/HEAD
112112 origin/blead
113113 ...
114114
115115=begin original
116116
117117The branches that begin with "origin" correspond to the "git remote"
118118that you cloned from (which is named "origin"). Each branch on the
119119remote will be exactly tracked by these branches. You should NEVER do
120120work on these remote tracking branches. You only ever do work in a
121121local branch. Local branches can be configured to automerge (on pull)
122122from a designated remote tracking branch. This is the case with the
123123default branch C<blead> which will be configured to merge from the
124124remote tracking branch C<origin/blead>.
125125
126126=end original
127127
128128"origin" で始まるブランチは、クローン元の "git remote"
129129("origin" という名前) に対応します。
130130リモートの各ブランチは、これらのブランチによって正確に追跡されます。
131131これらのリモート追跡ブランチでは絶対に作業しないでください。
132132ローカルブランチでのみ作業します。
133133ローカルブランチは、指定されたリモート追跡ブランチから
134134(プル時に)自動マージするように構成できます。
135135これは、リモート追跡ブランチ C<origin/blead> からマージするように
136136構成されているデフォルトブランチ C<blead> の場合です。
137137
138138=begin original
139139
140140You can see recent commits:
141141
142142=end original
143143
144144最近のコミットを見られます:
145145
146146 % git log
147147
148148=begin original
149149
150150And pull new changes from the repository, and update your local
151151repository (must be clean first)
152152
153153=end original
154154
155155リポジトリから新しい変更をプルし、ローカルリポジトリを更新します
156156(最初にクリーンにする必要があります)。
157157
158158 % git pull
159159
160160=begin original
161161
162162Assuming we are on the branch C<blead> immediately after a pull, this
163163command would be more or less equivalent to:
164164
165165=end original
166166
167167プルの直後にブランチ C<blead> にいると仮定すると、このコマンドは
168168以下とほぼ等価になります:
169169
170170 % git fetch
171171 % git merge origin/blead
172172
173173=begin original
174174
175175In fact if you want to update your local repository without touching
176176your working directory you do:
177177
178178=end original
179179
180180実際、作業ディレクトリにアクセスせずにローカルリポジトリを更新したい場合は、
181181次のようにします:
182182
183183 % git fetch
184184
185185=begin original
186186
187187And if you want to update your remote-tracking branches for all defined
188188remotes simultaneously you can do
189189
190190=end original
191191
192192また、定義されたすべてのリモートに対してリモート追跡ブランチを
193193同時に更新したい場合は、以下のように行うことができます:
194194
195195 % git remote update
196196
197197=begin original
198198
199199Neither of these last two commands will update your working directory,
200200however both will update the remote-tracking branches in your
201201repository.
202202
203203=end original
204204
205205最後の二つのコマンドはどちらも作業ディレクトリを更新しませんが、どちらも
206206リポジトリ内のリモート追跡ブランチを更新します。
207207
208208=begin original
209209
210210To make a local branch of a remote branch:
211211
212212=end original
213213
214214リモートブランチのローカルブランチを作るには:
215215
216216 % git checkout -b maint-5.10 origin/maint-5.10
217217
218218=begin original
219219
220220To switch back to blead:
221221
222222=end original
223223
224224blead に戻るには:
225225
226226 % git checkout blead
227227
228228=head2 Finding out your status
229229
230230(現在の状態を確認する)
231231
232232=begin original
233233
234234The most common git command you will use will probably be
235235
236236=end original
237237
238238おそらくもっともよく使う git コマンドは:
239239
240240 % git status
241241
242242=begin original
243243
244244This command will produce as output a description of the current state
245245of the repository, including modified files and unignored untracked
246246files, and in addition it will show things like what files have been
247247staged for the next commit, and usually some useful information about
248248how to change things. For instance the following:
249249
250250=end original
251251
252252このコマンドは、変更されたファイルや無視されていない
253253追跡されていないファイルなど、リポジトリの現在の状態の説明を
254254出力として生成します。
255255さらに、次のコミットのためにステージングされたファイルや、
256256通常は変更方法に関する有用な情報を表示します。
257257たとえば、次のようになります:
258258
259 $ git status
259 % git status
260 # On branch blead
260 On branch blead
261 # Your branch is ahead of 'origin/blead' by 1 commit.
261 Your branch is ahead of 'origin/blead' by 1 commit.
262 #
263 # Changes to be committed:
264 # (use "git reset HEAD <file>..." to unstage)
265 #
266 # modified: pod/perlgit.pod
267 #
268 # Changed but not updated:
269 # (use "git add <file>..." to update what will be committed)
270 #
271 # modified: pod/perlgit.pod
272 #
273 # Untracked files:
274 # (use "git add <file>..." to include in what will be committed)
275 #
276 # deliberate.untracked
277262
263 Changes to be committed:
264 (use "git reset HEAD <file>..." to unstage)
265
266 modified: pod/perlgit.pod
267
268 Changes not staged for commit:
269 (use "git add <file>..." to update what will be committed)
270 (use "git checkout -- <file>..." to discard changes in working
271 directory)
272
273 modified: pod/perlgit.pod
274
275 Untracked files:
276 (use "git add <file>..." to include in what will be committed)
277
278 deliberate.untracked
279
278280=begin original
279281
280282This shows that there were changes to this document staged for commit,
281283and that there were further changes in the working directory not yet
282284staged. It also shows that there was an untracked file in the working
283285directory, and as you can see shows how to change all of this. It also
284286shows that there is one commit on the working branch C<blead> which has
285not been pushed to the C<origin> remote yet. B<NOTE>: that this output
287not been pushed to the C<origin> remote yet. B<NOTE>: This output
286288is also what you see as a template if you do not provide a message to
287289C<git commit>.
288290
289291=end original
290292
291293これは、コミットのためにステージングされたこの文書に変更があったことと、
292294まだステージングされていないワーキングディレクトリに
293295さらに変更があったことを示しています。
294296また、ワーキングディレクトリに追跡されていないファイルが
295297あったことも示しています;
296298また、これらすべてを変更する方法を示しています。
297299また、C<origin> リモートにまだプッシュされていないワーキングブランチ
298300C<blead> に一つのコミットがあることも示しています。
299301B<注>: この出力は、C<git commit> にメッセージを提供しない場合に
300302テンプレートとして表示されるものでもあります。
301303
302304=head2 Patch workflow
303305
304306(パッチのワークフロー)
305307
306308=begin original
307309
308310First, please read L<perlhack> for details on hacking the Perl core.
309311That document covers many details on how to create a good patch.
310312
311313=end original
312314
313315まず、Perl コアをハックするための詳細については L<perlhack> を読んでください。
314316この文書はよいパッチの作り方に関する多くの詳細に対応しています。
315317
316318=begin original
317319
318320If you already have a Perl repository, you should ensure that you're on
319321the I<blead> branch, and your repository is up to date:
320322
321323=end original
322324
323325すでに Perl リポジトリを持っている場合は、
324326I<blead> ブランチにいて、リポジトリが最新であることを確認する必要があります:
325327
326328 % git checkout blead
327329 % git pull
328330
329331=begin original
330332
331333It's preferable to patch against the latest blead version, since this
332334is where new development occurs for all changes other than critical bug
333335fixes. Critical bug fix patches should be made against the relevant
334336maint branches, or should be submitted with a note indicating all the
335337branches where the fix should be applied.
336338
337339=end original
338340
339341最新の blead バージョンに対してパッチを適用することをお勧めします。
340342これは、重大なバグ修正以外のすべての変更に対して新たな開発が行われる
341343場所であるためです。
342344重大なバグ修正パッチは、関連するメインブランチに対して作成するか、
343345修正が適用されるすべてのブランチを示すメモとともに提出する必要があります。
344346
345347=begin original
346348
347349Now that we have everything up to date, we need to create a temporary
348350new branch for these changes and switch into it:
349351
350352=end original
351353
352354すべてが最新の状態になったので、これらの変更に対して一時的な
353355新しいブランチを作成し、そのブランチに切り替える必要があります:
354356
355357 % git checkout -b orange
356358
357359=begin original
358360
359361which is the short form of
360362
361363=end original
362364
363365これは以下のものの短縮形です
364366
365367 % git branch orange
366368 % git checkout orange
367369
368370=begin original
369371
370372Creating a topic branch makes it easier for the maintainers to rebase
371373or merge back into the master blead for a more linear history. If you
372374don't work on a topic branch the maintainer has to manually cherry pick
373375your changes onto blead before they can be applied.
374376
375377=end original
376378
377379トピックブランチを作成することで、メンテナはよりリニアな履歴のために
378380master blead にリベースまたはマージバックすることが簡単になります。
379381トピックブランチで作業しない場合、
380382メンテナは変更を適用する前に手動で blead にチェリーピックする
381383必要があります。
382384
383385=begin original
384386
385387That'll get you scolded on perl5-porters, so don't do that. Be Awesome.
386388
387389=end original
388390
389391perl5-porters で叱られることになるので、そんなことはしないでください。
390392うまくやりましょう。
391393
392394=begin original
393395
394396Then make your changes. For example, if Leon Brocard changes his name
395397to Orange Brocard, we should change his name in the AUTHORS file:
396398
397399=end original
398400
399401次に、変更を加えます。
400402たとえば、Leon Brocard が名前を Orange Brocard に変更した場合、
401403AUTHORS ファイル内の名前を変更する必要があります:
402404
403405 % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS
404406
405407=begin original
406408
407409You can see what files are changed:
408410
409411=end original
410412
411413どのファイルを変更したかを見られます:
412414
413415 % git status
414 # On branch orange
416 On branch orange
415 # Changes to be committed:
417 Changes to be committed:
416 # (use "git reset HEAD <file>..." to unstage)
418 (use "git reset HEAD <file>..." to unstage)
417 #
418 # modified: AUTHORS
419 #
420419
420 modified: AUTHORS
421
421422=begin original
422423
423424And you can see the changes:
424425
425426=end original
426427
427428そして変更が見られます:
428429
429 % git diff
430 % git diff
430 diff --git a/AUTHORS b/AUTHORS
431 diff --git a/AUTHORS b/AUTHORS
431 index 293dd70..722c93e 100644
432 index 293dd70..722c93e 100644
432 --- a/AUTHORS
433 --- a/AUTHORS
433 +++ b/AUTHORS
434 +++ b/AUTHORS
434 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
435 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
435 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
436 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
436 Leif Huhn <leif@hale.dkstat.com>
437 Leif Huhn <leif@hale.dkstat.com>
437 Len Johnson <lenjay@ibm.net>
438 Len Johnson <lenjay@ibm.net>
438 -Leon Brocard <acme@astray.com>
439 -Leon Brocard <acme@astray.com>
439 +Orange Brocard <acme@astray.com>
440 +Orange Brocard <acme@astray.com>
440 Les Peters <lpeters@aol.net>
441 Les Peters <lpeters@aol.net>
441 Lesley Binks <lesley.binks@gmail.com>
442 Lesley Binks <lesley.binks@gmail.com>
442 Lincoln D. Stein <lstein@cshl.org>
443 Lincoln D. Stein <lstein@cshl.org>
443444
444445=begin original
445446
446447Now commit your change locally:
447448
448449=end original
449450
450451ここで変更をローカルにコミットします:
451452
452 % git commit -a -m 'Rename Leon Brocard to Orange Brocard'
453 % git commit -a -m 'Rename Leon Brocard to Orange Brocard'
453 Created commit 6196c1d: Rename Leon Brocard to Orange Brocard
454 Created commit 6196c1d: Rename Leon Brocard to Orange Brocard
454 1 files changed, 1 insertions(+), 1 deletions(-)
455 1 files changed, 1 insertions(+), 1 deletions(-)
455456
456457=begin original
457458
458459The C<-a> option is used to include all files that git tracks that you
459460have changed. If at this time, you only want to commit some of the
460461files you have worked on, you can omit the C<-a> and use the command
461462C<S<git add I<FILE ...>>> before doing the commit. C<S<git add
462463--interactive>> allows you to even just commit portions of files
463464instead of all the changes in them.
464465
465466=end original
466467
467468C<-a> オプションは、git が追跡しているファイルの中であなたが変更した
468469全てのファイルを含むために使われます。
469470もしこの時点で、作業したファイルの一部だけをコミットしたい場合は、
470471C<-a> を省略して、コミットを行う前にコマンド
471472C<S<git add I<FILE ...>>> を使ってください。
472473C<S<git add --interactive>> は、ファイル中の全ての変更ではなく、
473474ファイルの一部をコミットできるようにします。
474475
475476=begin original
476477
477478The C<-m> option is used to specify the commit message. If you omit it,
478479git will open a text editor for you to compose the message
479480interactively. This is useful when the changes are more complex than
480481the sample given here, and, depending on the editor, to know that the
481482first line of the commit message doesn't exceed the 50 character legal
482483maximum.
483484
484485=end original
485486
486487C<-m> オプションはコミットメッセージを指定するために使われます。
487488これを省略すると、git はメッセージを対話的に作成するために
488489テキストエディタを開きます。
489490これは、変更がここで指定するサンプルよりも複雑な場合、そして
490491エディタによっては、コミットメッセージの先頭行が上限の
49149250 文字を超えないことを知るために有用です。
492493
493494=begin original
494495
495496Once you've finished writing your commit message and exited your
496497editor, git will write your change to disk and tell you something like
497498this:
498499
499500=end original
500501
501502コミットメッセージを書き終えてエディタを終了すると、
502503git は変更をディスクに書き込み、以下のようなメッセージを出力します:
503504
504 Created commit daf8e63: explain git status and stuff about remotes
505 Created commit daf8e63: explain git status and stuff about remotes
505 1 files changed, 83 insertions(+), 3 deletions(-)
506 1 files changed, 83 insertions(+), 3 deletions(-)
506507
507508=begin original
508509
509510If you re-run C<git status>, you should see something like this:
510511
511512=end original
512513
513514C<git status> を再実行すると、次のようなものが表示されます:
514515
515 % git status
516 % git status
516 # On branch blead
517 On branch orange
517 # Your branch is ahead of 'origin/blead' by 2 commits.
518 Untracked files:
518 #
519 (use "git add <file>..." to include in what will be committed)
519 # Untracked files:
520 # (use "git add <file>..." to include in what will be committed)
521 #
522 # deliberate.untracked
523 nothing added to commit but untracked files present (use "git add" to track)
524520
521 deliberate.untracked
522
523 nothing added to commit but untracked files present (use "git add" to
524 track)
525
525526=begin original
526527
527528When in doubt, before you do anything else, check your status and read
528529it carefully, many questions are answered directly by the git status
529530output.
530531
531532=end original
532533
533534疑わしいときには、他のことをする前に、ステータスをチェックして
534535注意深く読んでください;
535536多くの疑問は git status の出力で直接応えられています。
536537
537538=begin original
538539
539540You can examine your last commit with:
540541
541542=end original
542543
543544最後のコミットを以下のようにして検査できます:
544545
545546 % git show HEAD
546547
547548=begin original
548549
549550and if you are not happy with either the description or the patch
550551itself you can fix it up by editing the files once more and then issue:
551552
552553=end original
553554
554555説明またはパッチ自体に満足できない場合は、ファイルをもう一度編集してから
555556次のコマンドを発行することで修正できます:
556557
557558 % git commit -a --amend
558559
559560=begin original
560561
561562Now you should create a patch file for all your local changes:
562563
563564=end original
564565
565566ここで全てのローカルな変更のためのパッチファイルを作るべきです:
566567
567 % git format-patch -M origin..
568 % git format-patch -M blead..
568569 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
569570
570571=begin original
571572
573Or for a lot of changes, e.g. from a topic branch:
574
575=end original
576
577あるいは変更が多い場合、つまりトピックブランチからは:
578
579 % git format-patch --stdout -M blead.. > topic-branch-changes.patch
580
581=begin original
582
572583You should now send an email to
573584L<perlbug@perl.org|mailto:perlbug@perl.org> with a description of your
574585changes, and include this patch file as an attachment. In addition to
575586being tracked by RT, mail to perlbug will automatically be forwarded to
576587perl5-porters (with manual moderation, so please be patient). You
577588should only send patches to
578589L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> directly if the
579590patch is not ready to be applied, but intended for discussion.
580591
581592=end original
582593
583594L<perlbug@perl.org|mailto:perlbug@perl.org> 宛に変更内容を記載した
584595メールを送信し、このパッチファイルを添付ファイルとして送ってください。
585596RT で追跡することに加えて、
586597perlbug にメールすると、自動的に
587598perl5-porters に (手動のモデレーションの後、従って気長に待ってください)
588599転送されます。
589600パッチは適用する準備ができていない状態だけれども議論したい場合は、
590601L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> だけに
591602直接メールを送るべきです。
592603
593604=begin original
594605
595See the next section for how to configure and use git to send these
606Please do not use git-send-email(1) to send your patch. See L<Sending
596emails for you.
607patch emails|/Sending patch emails> for more information.
597608
598609=end original
599610
600これらのメールを送信すために git を設定して使う方法につては、
611パッチを送るに git-send-email(1) を使わなでください。
601次の節を参照してください
612らなる情報につては
613L<Sending patch emails|/Sending patch emails> を参照してください。
602614
603615=begin original
604616
605617If you want to delete your temporary branch, you may do so with:
606618
607619=end original
608620
609621一時的なブランチを削除したいなら、以下のようにできます:
610622
611 % git checkout blead
623 % git checkout blead
612 % git branch -d orange
624 % git branch -d orange
613 error: The branch 'orange' is not an ancestor of your current HEAD.
625 error: The branch 'orange' is not an ancestor of your current HEAD.
614 If you are sure you want to delete it, run 'git branch -D orange'.
626 If you are sure you want to delete it, run 'git branch -D orange'.
615 % git branch -D orange
627 % git branch -D orange
616 Deleted branch orange.
628 Deleted branch orange.
617629
618630=head2 Committing your changes
619631
620632(変更をコミットする)
621633
622634=begin original
623635
624636Assuming that you'd like to commit all the changes you've made as a
625637single atomic unit, run this command:
626638
627639=end original
628640
629641今行ったすべての変更を一つのアトミックユニットとしてコミットしたい場合は、
630642次のコマンドを実行します:
631643
632 % git commit -a
644 % git commit -a
633645
634646=begin original
635647
636648(That C<-a> tells git to add every file you've changed to this commit.
637649New files aren't automatically added to your commit when you use
638650C<commit -a> If you want to add files or to commit some, but not all of
639651your changes, have a look at the documentation for C<git add>.)
640652
641653=end original
642654
643655(C<-a> は git に対して、変更したすべてのファイルをこのコミットに
644656追加するように指示します。
645657C<commit -a> を使用しても、新しいファイルは自動的にコミットに追加されません。
646658ファイルを追加したい場合や、一部の変更をコミットしたい場合は、
647659C<git add> の文書を参照してください。
648660
649661=begin original
650662
651663Git will start up your favorite text editor, so that you can craft a
652664commit message for your change. See L<perlhack/Commit message> for more
653665information about what makes a good commit message.
654666
655667=end original
656668
657669Git は、あなたが変更内容のコミットメッセージを作成できるように、
658670お気に入りのテキストエディタを起動します。
659671適切なコミットメッセージを作成する方法に関するさらなる情報については、
660672L</Commit message> を参照してください。
661673
662674=begin original
663675
664676Once you've finished writing your commit message and exited your
665677editor, git will write your change to disk and tell you something like
666678this:
667679
668680=end original
669681
670682コミットメッセージを書き終えてエディタを終了すると、
671683git は変更をディスクに書き込み、以下のようなメッセージを出力します:
672684
673 Created commit daf8e63: explain git status and stuff about remotes
685 Created commit daf8e63: explain git status and stuff about remotes
674 1 files changed, 83 insertions(+), 3 deletions(-)
686 1 files changed, 83 insertions(+), 3 deletions(-)
675687
676688=begin original
677689
678690If you re-run C<git status>, you should see something like this:
679691
680692=end original
681693
682694C<git status> を再実行すると、次のようなものが表示されます:
683695
684 % git status
696 % git status
685 # On branch blead
697 On branch blead
686 # Your branch is ahead of 'origin/blead' by 2 commits.
698 Your branch is ahead of 'origin/blead' by 2 commits.
687 #
699 (use "git push" to publish your local commits)
688 # Untracked files:
700 Untracked files:
689 # (use "git add <file>..." to include in what will be committed)
701 (use "git add <file>..." to include in what will be committed)
690 #
691 # deliberate.untracked
692 nothing added to commit but untracked files present (use "git add" to track)
693702
703 deliberate.untracked
704
705 nothing added to commit but untracked files present (use "git add" to
706 track)
707
694708=begin original
695709
696710When in doubt, before you do anything else, check your status and read
697711it carefully, many questions are answered directly by the git status
698712output.
699713
700714=end original
701715
702716何か疑問がある場合には、何かをする前に自分のステータスをチェックして
703717注意深く読んでください;
704718多くの疑問に対しては、git status 出力が直接答えてくれます。
705719
706=head2 Using git to send patch emails
720=head2 Sending patch emails
707721
708(パッチをメールするのに git を使う)
722(パッチをメールする)
709723
710724=begin original
711725
712Please read L<perlhack> first in order to figure out where your patches
726After you've generated your patch you should send it
713should be sent.
727to L<perlbug@perl.org|mailto:perlbug@perl.org> (as discussed L<in the
728previous section|/"Patch workflow">) with a normal mail client as an
729attachment, along with a description of the patch.
714730
715731=end original
716732
717パッチをどこに送るべきかを知るめにはまず L<perlhack> を読んでください。
733パッチを作っ
734(L<前の節|/"Patch workflow"> で議論したように)
735それを添付ファイルにして、パッチの説明と共に、
736通常のメールクライアントで
737L<perlbug@perl.org|mailto:perlbug@perl.org> に送ってください。
718738
719739=begin original
720740
721In your ~/git/perl repository, set the destination email to perl's bug
741You B<must not> use git-send-email(1) to send patches generated with
722tracker:
742git-format-patch(1). The RT ticketing system living behind
743L<perlbug@perl.org|mailto:perlbug@perl.org> does not respect the inline
744contents of E-Mails, sending an inline patch to RT guarantees that your
745patch will be destroyed.
723746
724747=end original
725748
726~/git/perl リポジトリ、宛先メールperl のバグトラッカーに
749git-format-patch(1)生成したパッチ送るのに git-send-email(1)
727設定し
750使っては B<いけせん>
751L<perlbug@perl.org|mailto:perlbug@perl.org> の後ろで動いている
752RT チケットシステムは、
753電子メールのインラインコンテンツを認識しないので、
754RT にインラインでパッチを送ると、パッチは破壊されます。
728755
729 $ git config sendemail.to perlbug@perl.org
730
731756=begin original
732757
733Or maybe perl5-porters:
758Someone may download your patch from RT, which will result in the
759subject (the first line of the commit message) being omitted. See
760L<RT #74192|https://rt.perl.org/Ticket/Display.html?id=74192> and
761L<commit a4583001|http://perl5.git.perl.org/perl.git/commitdiff/a4583001>
762for an example. Alternatively someone may
763apply your patch from RT after it arrived in their mailbox, by which
764time RT will have modified the inline content of the message. See
765L<RT #74532|https://rt.perl.org/Ticket/Display.html?id=74532> and
766L<commit f9bcfeac|http://perl5.git.perl.org/perl.git/commitdiff/f9bcfeac>
767for a bad example of this failure mode.
734768
735769=end original
736770
737またはおそ perl5-porters:
771誰かが RT かパッチをダウンロードすると、題名 (コミットメッセージの
772最初の行) は削除されます。
773例えば
774L<RT #74192|https://rt.perl.org/Ticket/Display.html?id=74192> と
775L<コミット a4583001|http://perl5.git.perl.org/perl.git/commitdiff/a4583001>
776を参照してください。
777あるいは、誰かがメールボックスに届いた RT からのパッチを
778適用するかもしれません; この場合 RT はメッセージのインラインコンテンツを
779変更しています。
780この失敗に関する悪い例は RT #74532 とコミット f9bcfeac を参照してください。
738781
739 $ git config sendemail.to perl5-porters@perl.org
740
741=begin original
742
743Then you can use git directly to send your patch emails:
744
745=end original
746
747その後、git を直接使ってパッチメールを送ることができます:
748
749 $ git send-email 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
750
751=begin original
752
753You may need to set some configuration variables for your particular
754email service provider. For example, to set your global git config to
755send email via a gmail account:
756
757=end original
758
759特定の電子メールサービスプロバイダに対していくつかの設定変数を設定する
760必要があるかもしれません。
761例えば、gmail アカウント経由で電子メールを送信するように
762グローバル git を設定するには:
763
764 $ git config --global sendemail.smtpserver smtp.gmail.com
765 $ git config --global sendemail.smtpssl 1
766 $ git config --global sendemail.smtpuser YOURUSERNAME@gmail.com
767
768=begin original
769
770With this configuration, you will be prompted for your gmail password
771when you run 'git send-email'. You can also configure
772C<sendemail.smtppass> with your password if you don't care about having
773your password in the .gitconfig file.
774
775=end original
776
777この設定では、'git send-email' を実行するときに
778gmail パスワードの入力を求められます。
779.gitconfig ファイルにパスワードを保存したくない場合は、
780C<sendemail.smtppass> にパスワードを設定することもできます。
781
782782=head2 A note on derived files
783783
784784(派生ファイルに関する注意)
785785
786786=begin original
787787
788788Be aware that many files in the distribution are derivative--avoid
789789patching them, because git won't see the changes to them, and the build
790790process will overwrite them. Patch the originals instead. Most
791791utilities (like perldoc) are in this category, i.e. patch
792792F<utils/perldoc.PL> rather than F<utils/perldoc>. Similarly, don't
793create patches for files under $src_root/ext from their copies found in
793create patches for files under F<$src_root/ext> from their copies found
794$install_root/lib. If you are unsure about the proper location of a
794in F<$install_root/lib>. If you are unsure about the proper location of
795file that may have gotten copied while building the source
795a file that may have gotten copied while building the source
796distribution, consult the C<MANIFEST>.
796distribution, consult the F<MANIFEST>.
797797
798798=end original
799799
800800ディストリビューション内の多くのファイルは
801801派生的なものであることに注意してください --
802802それらのファイルにパッチを当てることは避けてください;
803803なぜなら、git はそれらに対する変更を見ることができず、
804804ビルドプロセスがそれらを上書きするからです。
805805代わりにオリジナルにパッチを当ててください。
806806ほとんどのユーティリティ(perldoc など)はこのカテゴリにあります;
807807すなわち、utils/perldoc ではなく F<utils/perldoc.PL> にパッチを当てます。
808同様に、$install_root/lib にあるコピーから $src_root/ext 以下のファイルに
808同様に、F<$install_root/lib> にあるコピーから F<$src_root/ext> 以下のファイルに
809809パッチを作成しないでください。
810810ソースディストリビューションのビルド中にコピーされた可能性のあるファイルの
811適切な場所がわからない場合は、C<MANIFEST> を調べてください。
811適切な場所がわからない場合は、F<MANIFEST> を調べてください。
812812
813813=head2 Cleaning a working directory
814814
815815(作業ディレクトリを掃除する)
816816
817817=begin original
818818
819819The command C<git clean> can with varying arguments be used as a
820820replacement for C<make clean>.
821821
822822=end original
823823
824824C<git clean> コマンドはさまざまな引数で C<make clean> の代わりに
825825使うことができます。
826826
827827=begin original
828828
829829To reset your working directory to a pristine condition you can do:
830830
831831=end original
832832
833833作業ディレクトリを初期状態にリセットするには、次のようにします:
834834
835835 % git clean -dxf
836836
837837=begin original
838838
839839However, be aware this will delete ALL untracked content. You can use
840840
841841=end original
842842
843843ただし、これによりすべての追跡されていないコンテンツが削除されます。
844844次のようにすると:
845845
846846 % git clean -Xf
847847
848848=begin original
849849
850850to remove all ignored untracked files, such as build and test
851byproduct, but leave any manually created files alone.
851byproduct, but leave any manually created files alone.
852852
853853=end original
854854
855855ビルドやテストの副産物など、すべての無視された
856856追跡されていないファイルを削除します。
857857ただし、手動で作成したファイルは残します。
858858
859859=begin original
860860
861861If you only want to cancel some uncommitted edits, you can use C<git
862862checkout> and give it a list of files to be reverted, or C<git checkout
863863-f> to revert them all.
864864
865865=end original
866866
867867コミットされていない編集だけをキャンセルしたい場合は、
868868C<git checkout> を使用して元に戻すファイルのリストを与えるか、
869869C<git checkout -f> を使用してすべてを元に戻すことができます。
870870
871871=begin original
872872
873873If you want to cancel one or several commits, you can use C<git reset>.
874874
875875=end original
876876
8778771つまたは複数のコミットをキャンセルしたい場合は、C<git reset> を
878878使うことができます。
879879
880880=head2 Bisecting
881881
882882(bisect)
883883
884884=begin original
885885
886886C<git> provides a built-in way to determine which commit should be blamed
887887for introducing a given bug. C<git bisect> performs a binary search of
888888history to locate the first failing commit. It is fast, powerful and
889889flexible, but requires some setup and to automate the process an auxiliary
890890shell script is needed.
891891
892892=end original
893893
894894C<git> は、指定されたバグが導入されたのがどのコミットに責任があるかを
895895決定する組み込みの手段を提供しています。
896896C<git bisect> は失敗する最初のコミットを特定するために
897897履歴の二分検索を行います。
898898これは高速で強力で柔軟性がありますが、多少の準備が必要で、
899899処理を自動化するには外部シェルスクリプトが必要です。
900900
901901=begin original
902902
903903The core provides a wrapper program, F<Porting/bisect.pl>, which attempts to
904904simplify as much as possible, making bisecting as simple as running a Perl
905905one-liner. For example, if you want to know when this became an error:
906906
907907=end original
908908
909909コアはラッパプログラムである F<Porting/bisect.pl> を提供しています;
910910これはできるだけ作業を単純化して、
911911Perl のワンライナーを実行するだけで bisect ができるようにします。
912912例えば、次のものがいつエラーになったかを知りたい場合:
913913
914914 perl -e 'my $a := 2'
915915
916916=begin original
917917
918918you simply run this:
919919
920920=end original
921921
922922単純にこれを実行します:
923923
924924 .../Porting/bisect.pl -e 'my $a := 2;'
925925
926926=begin original
927927
928Using C<bisect.pl>, with one command (and no other files) it's easy to find
928Using F<Porting/bisect.pl>, with one command (and no other files) it's easy to
929out
929find out
930930
931931=end original
932932
933C<bisect.pl> を (他のファイルなしで) 一つのコマンドで使うことで、
933F<Porting/bisect.pl> を (他のファイルなしで) 一つのコマンドで使うことで、
934934次のものを簡単に見つけられます:
935935
936936=over 4
937937
938938=item *
939939
940940=begin original
941941
942942Which commit caused this example code to break?
943943
944944=end original
945945
946946どのコミットがこの例のコードを壊しているか
947947
948948=item *
949949
950950=begin original
951951
952952Which commit caused this example code to start working?
953953
954954=end original
955955
956956どのコミットからこの例のコードが動作し始めているか
957957
958958=item *
959959
960960=begin original
961961
962962Which commit added the first file to match this regex?
963963
964964=end original
965965
966966どのコミットが最初にこの正規表現にマッチングするファイルを追加したか
967967
968968=item *
969969
970970=begin original
971971
972972Which commit removed the last file to match this regex?
973973
974974=end original
975975
976976どのコミットが最後にこの正規表現にマッチングするファイルを削除したか
977977
978978=back
979979
980980=begin original
981981
982982usually without needing to know which versions of perl to use as start and
983end revisions, as F<bisect.pl> automatically searches to find the earliest
983end revisions, as F<Porting/bisect.pl> automatically searches to find the
984stable version for which the test case passes. Run
984earliest stable version for which the test case passes. Run
985985C<Porting/bisect.pl --help> for the full documentation, including how to
986986set the C<Configure> and build time options.
987987
988988=end original
989989
990990通常はどのバージョンの perl を使うかの始点と終点のリビジョンを
991知っている必要はありません;
991知っている必要はありません; F<Porting/bisect.pl> は自動的に、
992F<bisect.pl> は自動的に、テストケースが通過する最初の安定版バージョンを
992テストケースが通過する最初の安定版バージョンを探します。
993探します。
994993C<Configure> とビルド時オプションを含む完全な文書を見るには
995994C<Porting/bisect.pl --help> を実行してください。
996995
997996=begin original
998997
999998If you require more flexibility than F<Porting/bisect.pl> has to offer, you'll
1000999need to run C<git bisect> yourself. It's most useful to use C<git bisect run>
10011000to automate the building and testing of perl revisions. For this you'll need
10021001a shell script for C<git> to call to test a particular revision. An example
10031002script is F<Porting/bisect-example.sh>, which you should copy B<outside> of
10041003the repository, as the bisect process will reset the state to a clean checkout
10051004as it runs. The instructions below assume that you copied it as F<~/run> and
10061005then edited it as appropriate.
10071006
10081007=end original
10091008
10101009F<Porting/bisect.pl> が提供しているものよりもさらに柔軟性が必要な場合、
10111010C<git bisect> を自分自身で実行する必要があります。
10121011perl リビジョンのビルドとテストを自動化するために
10131012C<git bisect run> を使うのが最も便利です。
10141013このために、特定のリビジョンをテストするために呼び出すための
10151014C<git> のためのシェルスクリプトが必要です。
10161015例のスクリプトは F<Porting/bisect-example.sh> で、
10171016これはリポジトリの B<外側> にコピーするべきです;
10181017bisect 処理は、実行されるとクリーンなチェックアウトのために
10191018状態をリセットするからです。
10201019後述の説明は、スクリプトを F<~/run> としてコピーして、それを
10211020適切に編集することを仮定しています。
10221021
10231022=begin original
10241023
10251024You first enter in bisect mode with:
10261025
10271026=end original
10281027
10291028まず bisect モードに入ります:
10301029
10311030 % git bisect start
10321031
10331032=begin original
10341033
10351034For example, if the bug is present on C<HEAD> but wasn't in 5.10.0,
10361035C<git> will learn about this when you enter:
10371036
10381037=end original
10391038
10401039例えば、バグが C<HEAD> にあっても 5.10.0 にはなかった場合、C<git> は
10411040以下のように入力することでこれを学習します:
10421041
10431042 % git bisect bad
10441043 % git bisect good perl-5.10.0
10451044 Bisecting: 853 revisions left to test after this
10461045
10471046=begin original
10481047
10491048This results in checking out the median commit between C<HEAD> and
10501049C<perl-5.10.0>. You can then run the bisecting process with:
10511050
10521051=end original
10531052
10541053この結果、C<HEAD> と C<perl-5.10.0> の中間のコミットが
10551054チェックアウトされます。
10561055次のようにして bisect 処理を実行します:
10571056
10581057 % git bisect run ~/run
10591058
10601059=begin original
10611060
10621061When the first bad commit is isolated, C<git bisect> will tell you so:
10631062
10641063=end original
10651064
10661065最初の不正なコミットが分離されると、C<git bisect> は次のように言います:
10671066
10681067 ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 is first bad commit
10691068 commit ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5
10701069 Author: Dave Mitchell <davem@fdisolutions.com>
10711070 Date: Sat Feb 9 14:56:23 2008 +0000
10721071
10731072 [perl #49472] Attributes + Unknown Error
10741073 ...
10751074
10761075 bisect run success
10771076
10781077=begin original
10791078
10801079You can peek into the bisecting process with C<git bisect log> and
10811080C<git bisect visualize>. C<git bisect reset> will get you out of bisect
10821081mode.
10831082
10841083=end original
10851084
10861085C<git bisect log> と C<git bisect visualize> で bisect 処理を
10871086覗き見ることができます。
10881087C<git bisect reset>は bisect モードを解除します。
10891088
10901089=begin original
10911090
10921091Please note that the first C<good> state must be an ancestor of the
10931092first C<bad> state. If you want to search for the commit that I<solved>
10941093some bug, you have to negate your test case (i.e. exit with C<1> if OK
10951094and C<0> if not) and still mark the lower bound as C<good> and the
10961095upper as C<bad>. The "first bad commit" has then to be understood as
10971096the "first commit where the bug is solved".
10981097
10991098=end original
11001099
11011100最初の C<good> 状態は、最初の C<bad> 状態の祖先である必要があることに
11021101注意してください。
11031102何らかのバグを I<解決した> コミットを検索したい場合は、テストケースを
11041103反転させ、
11051104(つまり、OK なら C<1> で終了し、そうでないなら C<0> で終了する)、
11061105下限を C<good>、上限を C<bad> とマークする必要があります。
11071106「最初の不正なコミット」は、「バグが解決された最初のコミット」と
11081107解釈する必要があります。
11091108
11101109=begin original
11111110
11121111C<git help bisect> has much more information on how you can tweak your
11131112binary searches.
11141113
11151114=end original
11161115
11171116C<git help bisect> には、二分探索を微調整する方法に関する情報が豊富に
11181117用意されています。
11191118
1120=head1 Topic branches and rewriting history
1119=head2 Topic branches and rewriting history
11211120
11221121(トピックブランチと履歴の書き換え)
11231122
11241123=begin original
11251124
11261125Individual committers should create topic branches under
1127B<yourname>/B<some_descriptive_name>. Other committers should check
1126B<yourname>/B<some_descriptive_name>:
1128with a topic branch's creator before making any change to it.
11291127
11301128=end original
11311129
11321130個々のコミッターは、B<yourname>/B<some_descriptive_name>
1133の下にトピックブランチを作成する必要があります
1131の下にトピックブランチを作成する必要があります:
1134他のコミッターは、トピックブランチに変更を加える前に、その作成者に
1135確認する必要があります。
11361132
1133 % branch="$yourname/$some_descriptive_name"
1134 % git checkout -b $branch
1135 ... do local edits, commits etc ...
1136 % git push origin -u $branch
1137
11371138=begin original
11381139
1139The simplest way to create a remote topic branch that works on all
1140Should you be stuck with an ancient version of git (prior to 1.7), then
1140versions of git is to push the current head as a new branch on the
1141C<git push> will not have the C<-u> switch, and you have to replace the
1141remote, then check it out locally:
1142last step with the following sequence:
11421143
11431144=end original
11441145
1145すべバージョンの git で動作する、リモートトピックブランチ作成す
1146も古いバージョン (1.7 より前) の git をまだ使ってい場合、
1146最も簡単な方法は、現在の head をリモートの新しいブランチとしてュし、
1147C<git push> には C<-u> オプションがありません;
1147ローカルチェックアウトすことで
1148最後の手順を次のもの置き換え必要がありま:
11481149
1149 $ branch="$yourname/$some_descriptive_name"
1150 % git push origin $branch:refs/heads/$branch
1150 $ git push origin HEAD:$branch
1151 % git config branch.$branch.remote origin
1151 $ git checkout -b $branch origin/$branch
1152 % git config branch.$branch.merge refs/heads/$branch
11521153
11531154=begin original
11541155
1155Users of git 1.7 or newer can do it in a more obvious manner:
1156If you want to make changes to someone else's topic branch, you should
1157check with its creator before making any change to it.
11561158
11571159=end original
11581160
1159git 1.7 以降ユーザは、もっと明らかな方法使うことが出来ま:
1161人のトピックブランチ変更したい場合、変更る前に
1162その作成者に確認する必要があります。
11601163
1161 $ branch="$yourname/$some_descriptive_name"
1162 $ git checkout -b $branch
1163 $ git push origin -u $branch
1164
11651164=begin original
11661165
1167If you are not the creator of B<yourname>/B<some_descriptive_name>, you
1166You
11681167might sometimes find that the original author has edited the branch's
11691168history. There are lots of good reasons for this. Sometimes, an author
11701169might simply be rebasing the branch onto a newer source point.
11711170Sometimes, an author might have found an error in an early commit which
11721171they wanted to fix before merging the branch to blead.
11731172
11741173=end original
11751174
1176B<yourname>/B<some_descriptive_name> の作成者でない場合、元の作成者が
1175元の作成者がブランチの履歴を編集したことに気付くことがあります。
1177ブランチの履歴を編集したことに気付くことがあります。
11781176これには多くの正当な理由があります。
11791177場合によっては、単にブランチを新しいソースポイントに基づいて
11801178作り直すことになることもあります。
11811179場合によっては、ブランチを blead にマージする前に、
11821180初期のコミットで修正したいエラーを見つけたこともあります。
11831181
11841182=begin original
11851183
11861184Currently the master repository is configured to forbid
11871185non-fast-forward merges. This means that the branches within can not be
11881186rebased and pushed as a single step.
11891187
11901188=end original
11911189
11921190現在、マスターリポジトリは、非 fast-forward のマージを禁止するように
11931191構成されています。
11941192これは、中のブランチはリベースとプッシュを単一ステップとしては
11951193できないことを意味します。
11961194
11971195=begin original
11981196
11991197The only way you will ever be allowed to rebase or modify the history
12001198of a pushed branch is to delete it and push it as a new branch under
12011199the same name. Please think carefully about doing this. It may be
12021200better to sequentially rename your branches so that it is easier for
12031201others working with you to cherry-pick their local changes onto the new
12041202version. (XXX: needs explanation).
12051203
12061204=end original
12071205
12081206プッシュされたブランチの履歴を再取得または変更する唯一の方法は、
12091207そのブランチを削除し、同じ名前で新しいブランチとしてプッシュすることです。
12101208これを行うことについては慎重に検討してください。
12111209他のユーザーが新しいバージョンにローカルの変更を簡単に
12121210チェリーピックできるように、
12131211ブランチの名前を順番に変更した方がよい場合があります(XXX:説明が必要)。
12141212
12151213=begin original
12161214
12171215If you want to rebase a personal topic branch, you will have to delete
12181216your existing topic branch and push as a new version of it. You can do
12191217this via the following formula (see the explanation about C<refspec>'s
12201218in the git push documentation for details) after you have rebased your
12211219branch:
12221220
12231221=end original
12241222
12251223個人的なトピックブランチをリベースしたい場合は、
12261224既存のトピックブランチを削除し、新しいバージョンとして
12271225プッシュする必要があります。
12281226これは、ブランチをリベースした後、次の公式
12291227(詳細は git push 文書の C<refspec> に関する説明を参照)で行うことができます。
12301228
1231 # first rebase
1229 # first rebase
1232 $ git checkout $user/$topic
1230 % git checkout $user/$topic
1233 $ git fetch
1231 % git fetch
1234 $ git rebase origin/blead
1232 % git rebase origin/blead
12351233
1236 # then "delete-and-push"
1234 # then "delete-and-push"
1237 $ git push origin :$user/$topic
1235 % git push origin :$user/$topic
1238 $ git push origin $user/$topic
1236 % git push origin $user/$topic
12391237
12401238=begin original
12411239
12421240B<NOTE:> it is forbidden at the repository level to delete any of the
12431241"primary" branches. That is any branch matching
12441242C<m!^(blead|maint|perl)!>. Any attempt to do so will result in git
12451243producing an error like this:
12461244
12471245=end original
12481246
12491247B<注意:> リポジトリレベルで"プライマリ"ブランチを削除することは
12501248禁止されています。
12511249これは C<m!^(blead maint perl)!> にマッチングするブランチです。
12521250削除しようとすると、gitは次のようなエラーを生成します:
12531251
1254 $ git push origin :blead
1252 % git push origin :blead
1255 *** It is forbidden to delete blead/maint branches in this repository
1253 *** It is forbidden to delete blead/maint branches in this repository
1256 error: hooks/update exited with error code 1
1254 error: hooks/update exited with error code 1
1257 error: hook declined to update refs/heads/blead
1255 error: hook declined to update refs/heads/blead
1258 To ssh://perl5.git.perl.org/perl
1256 To ssh://perl5.git.perl.org/perl
1259 ! [remote rejected] blead (hook declined)
1257 ! [remote rejected] blead (hook declined)
1260 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl'
1258 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl'
12611259
12621260=begin original
12631261
12641262As a matter of policy we do B<not> edit the history of the blead and
12651263maint-* branches. If a typo (or worse) sneaks into a commit to blead or
12661264maint-*, we'll fix it in another commit. The only types of updates
1267allowed on these branches are "fast-forward's", where all history is
1265allowed on these branches are "fast-forwards", where all history is
12681266preserved.
12691267
12701268=end original
12711269
12721270ポリシーとして、blead ブランチと maint-* ブランチの履歴は編集 B<しません>。
12731271タイプミス(またはそれ以上)が blead または maint-* へのコミットに
12741272忍び込んだ場合は、別のコミットで修正します。
12751273これらのブランチで許可されている更新のタイプは "fast-forward" だけで、
12761274すべての履歴が保存されます。
12771275
12781276=begin original
12791277
12801278Annotated tags in the canonical perl.git repository will never be
12811279deleted or modified. Think long and hard about whether you want to push
1282a local tag to perl.git before doing so. (Pushing unannotated tags is
1280a local tag to perl.git before doing so. (Pushing simple tags is
12831281not allowed.)
12841282
12851283=end original
12861284
12871285標準的な perl.git リポジトリ内の注釈付きタグは、削除や
12881286変更されることはありません。
12891287ローカルタグを perl.git にプッシュする前に、じっくり考えてみてください
1290(注釈なしタグのプッシュは許可されていません)。
1288(単純タグのプッシュは許可されていません)。
12911289
12921290=head2 Grafts
12931291
12941292(接ぎ木)
12951293
12961294=begin original
12971295
12981296The perl history contains one mistake which was not caught in the
12991297conversion: a merge was recorded in the history between blead and
13001298maint-5.10 where no merge actually occurred. Due to the nature of git,
13011299this is now impossible to fix in the public repository. You can remove
13021300this mis-merge locally by adding the following line to your
13031301C<.git/info/grafts> file:
13041302
13051303=end original
13061304
13071305Perl履歴には、変換で検出されなかった誤りが一つ含まれています:
13081306blead と maint-5.10 の間の履歴にマージが記録されましたが、
13091307実際にはマージは発生しませんでした。
13101308git の性質上、パブリックリポジトリで修正することは現在不可能です。
13111309C<.git/info/graft> ファイルに次の行を追加することで、
13121310この誤ったマージをローカルで削除できます。
13131311
1314 296f12bbbbaa06de9be9d09d3dcf8f4528898a49 434946e0cb7a32589ed92d18008aaa1d88515930
1312 296f12bbbbaa06de9be9d09d3dcf8f4528898a49 434946e0cb7a32589ed92d18008aaa1d88515930
13151313
13161314=begin original
13171315
13181316It is particularly important to have this graft line if any bisecting
13191317is done in the area of the "merge" in question.
13201318
13211319=end original
13221320
13231321問題の「マージ」領域で bisect が行われる場合、この graft 行を
13241322指定することが特に重要です。
13251323
13261324=head1 WRITE ACCESS TO THE GIT REPOSITORY
13271325
13281326(git リポジトリへの書き込みアクセス)
13291327
13301328=begin original
13311329
13321330Once you have write access, you will need to modify the URL for the
13331331origin remote to enable pushing. Edit F<.git/config> with the
13341332git-config(1) command:
13351333
13361334=end original
13371335
13381336一旦書き込み権限を得たら、
13391337プッシュを有効にするために origin remote のための URL を
13401338変更する必要があります。
13411339git-config(1) コマンドで F<.git/config> を次のように編集します:
13421340
13431341 % git config remote.origin.url ssh://perl5.git.perl.org/perl.git
13441342
13451343=begin original
13461344
13471345You can also set up your user name and e-mail address. Most people do
13481346this once globally in their F<~/.gitconfig> by doing something like:
13491347
13501348=end original
13511349
13521350ユーザー名と電子メールアドレスを設定することもできます。
13531351ほとんどの人は、以下のようにすることで F<~/.gitconfig> でグローバルに
13541352一度これを行います:
13551353
13561354 % git config --global user.name "Ævar Arnfjörð Bjarmason"
13571355 % git config --global user.email avarab@gmail.com
13581356
13591357=begin original
13601358
1361However if you'd like to override that just for perl then execute then
1359However, if you'd like to override that just for perl,
13621360execute something like the following in F<perl>:
13631361
13641362=end original
13651363
13661364しかし、perl だけに対してこれを変更したい場合は、
13671365F<perl> で次のようなものを実行します:
13681366
13691367 % git config user.email avar@cpan.org
13701368
13711369=begin original
13721370
13731371It is also possible to keep C<origin> as a git remote, and add a new
13741372remote for ssh access:
13751373
13761374=end original
13771375
13781376C<origin> を git remote として維持し、ssh アクセス用の新しい remote を
13791377追加することも可能です:
13801378
13811379 % git remote add camel perl5.git.perl.org:/perl.git
13821380
13831381=begin original
13841382
13851383This allows you to update your local repository by pulling from
13861384C<origin>, which is faster and doesn't require you to authenticate, and
13871385to push your changes back with the C<camel> remote:
13881386
13891387=end original
13901388
13911389これにより、C<origin> からプルしてローカルリポジトリを更新できます;
13921390これはより高速で、認証を必要としません;
13931391また、C<camel> リモートで変更をプッシュバックすることもできます。
13941392
13951393 % git fetch camel
13961394 % git push camel
13971395
13981396=begin original
13991397
14001398The C<fetch> command just updates the C<camel> refs, as the objects
14011399themselves should have been fetched when pulling from C<origin>.
14021400
14031401=end original
14041402
14051403C<fetch> コマンドは単に C<camel> refs を更新するだけです;
14061404なぜなら、オブジェクト自体は C<origin> からプルするときに
14071405フェッチされるべきだからです。
14081406
1409=head1 Accepting a patch
1407=head2 Accepting a patch
14101408
14111409(パッチを受け入れる)
14121410
14131411=begin original
14141412
14151413If you have received a patch file generated using the above section,
14161414you should try out the patch.
14171415
14181416=end original
14191417
14201418前述の節でを使って生成されたパッチファイルを受け取った場合は、
14211419パッチを試してみてください。
14221420
14231421=begin original
14241422
14251423First we need to create a temporary new branch for these changes and
14261424switch into it:
14271425
14281426=end original
14291427
14301428まず、これらの変更のための一時的な新しいブランチを作成し、そのブランチに
14311429切り替える必要があります:
14321430
1433 % git checkout -b experimental
1431 % git checkout -b experimental
14341432
14351433=begin original
14361434
14371435Patches that were formatted by C<git format-patch> are applied with
14381436C<git am>:
14391437
14401438=end original
14411439
14421440C<git format-patch> でフォーマットされたパッチは、C<git am> で適用されます:
14431441
1444 % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1442 % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1445 Applying Rename Leon Brocard to Orange Brocard
1443 Applying Rename Leon Brocard to Orange Brocard
14461444
14471445=begin original
14481446
1447Note that some UNIX mail systems can mess with text attachments containing
1448'From '. This will fix them up:
1449
1450=end original
1451
1452一部の UNIX メールシステムは、添付テキストに 'From ' が含まれていると
1453おかしくなるかもしれないことに注意してください。
1454これは次のようにして修正します:
1455
1456 % perl -pi -e's/^>From /From /' \
1457 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1458
1459=begin original
1460
14491461If just a raw diff is provided, it is also possible use this two-step
14501462process:
14511463
14521464=end original
14531465
14541466生の diff だけが提供されている場合は、次の 2 段階のプロセスを
14551467使用することもできます:
14561468
1457 % git apply bugfix.diff
1469 % git apply bugfix.diff
1458 % git commit -a -m "Some fixing" --author="That Guy <that.guy@internets.com>"
1470 % git commit -a -m "Some fixing" \
1471 --author="That Guy <that.guy@internets.com>"
14591472
14601473=begin original
14611474
14621475Now we can inspect the change:
14631476
14641477=end original
14651478
14661479ここで変更を検査できます:
14671480
1468 % git show HEAD
1481 % git show HEAD
1469 commit b1b3dab48344cff6de4087efca3dbd63548ab5e2
1482 commit b1b3dab48344cff6de4087efca3dbd63548ab5e2
1470 Author: Leon Brocard <acme@astray.com>
1483 Author: Leon Brocard <acme@astray.com>
1471 Date: Fri Dec 19 17:02:59 2008 +0000
1484 Date: Fri Dec 19 17:02:59 2008 +0000
14721485
1473 Rename Leon Brocard to Orange Brocard
1486 Rename Leon Brocard to Orange Brocard
14741487
1475 diff --git a/AUTHORS b/AUTHORS
1488 diff --git a/AUTHORS b/AUTHORS
1476 index 293dd70..722c93e 100644
1489 index 293dd70..722c93e 100644
1477 --- a/AUTHORS
1490 --- a/AUTHORS
1478 +++ b/AUTHORS
1491 +++ b/AUTHORS
1479 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
1492 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
1480 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
1493 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
1481 Leif Huhn <leif@hale.dkstat.com>
1494 Leif Huhn <leif@hale.dkstat.com>
1482 Len Johnson <lenjay@ibm.net>
1495 Len Johnson <lenjay@ibm.net>
1483 -Leon Brocard <acme@astray.com>
1496 -Leon Brocard <acme@astray.com>
1484 +Orange Brocard <acme@astray.com>
1497 +Orange Brocard <acme@astray.com>
1485 Les Peters <lpeters@aol.net>
1498 Les Peters <lpeters@aol.net>
1486 Lesley Binks <lesley.binks@gmail.com>
1499 Lesley Binks <lesley.binks@gmail.com>
1487 Lincoln D. Stein <lstein@cshl.org>
1500 Lincoln D. Stein <lstein@cshl.org>
14881501
14891502=begin original
14901503
14911504If you are a committer to Perl and you think the patch is good, you can
14921505then merge it into blead then push it out to the main repository:
14931506
14941507=end original
14951508
14961509もしあなたが Perl のコミッタで、パッチが良いものだと思うなら、
14971510それを blead にマージしてメインのリポジトリにプッシュすることができます:
14981511
14991512 % git checkout blead
15001513 % git merge experimental
1501 % git push
1514 % git push origin blead
15021515
15031516=begin original
15041517
15051518If you want to delete your temporary branch, you may do so with:
15061519
15071520=end original
15081521
15091522一時的なブランチを削除したいなら、以下のようにできます:
15101523
1511 % git checkout blead
1524 % git checkout blead
1512 % git branch -d experimental
1525 % git branch -d experimental
1513 error: The branch 'experimental' is not an ancestor of your current HEAD.
1526 error: The branch 'experimental' is not an ancestor of your current
1514 If you are sure you want to delete it, run 'git branch -D experimental'.
1527 HEAD. If you are sure you want to delete it, run 'git branch -D
1515 % git branch -D experimental
1528 experimental'.
1516 Deleted branch experimental.
1529 % git branch -D experimental
1530 Deleted branch experimental.
15171531
15181532=head2 Committing to blead
15191533
15201534(blead にコミットする)
15211535
15221536=begin original
15231537
15241538The 'blead' branch will become the next production release of Perl.
15251539
15261540=end original
15271541
15281542'blead' ブランチは、Perl の次の正式版リリースになります。
15291543
15301544=begin original
15311545
15321546Before pushing I<any> local change to blead, it's incredibly important
15331547that you do a few things, lest other committers come after you with
15341548pitchforks and torches:
15351549
15361550=end original
15371551
15381552I<何らかの> ローカルな変更をプッシュする前に、
15391553あなたの後から来る他のコミッタが熊手と松明を持ってこないように、
15401554いくつかのことをするのが極めて重要です:
15411555
15421556=over
15431557
15441558=item *
15451559
15461560=begin original
15471561
15481562Make sure you have a good commit message. See L<perlhack/Commit
15491563message> for details.
15501564
15511565=end original
15521566
15531567よいコミットメッセージを書くようにしてください。
15541568詳しくは L<perlhack/Commit message> を参照してください。
15551569
15561570=item *
15571571
15581572=begin original
15591573
15601574Run the test suite. You might not think that one typo fix would break a
15611575test file. You'd be wrong. Here's an example of where not running the
15621576suite caused problems. A patch was submitted that added a couple of
1563tests to an existing .t. It couldn't possibly affect anything else, so
1577tests to an existing F<.t>. It couldn't possibly affect anything else, so
1564no need to test beyond the single affected .t, right? But, the
1578no need to test beyond the single affected F<.t>, right? But, the
15651579submitter's email address had changed since the last of their
15661580submissions, and this caused other tests to fail. Running the test
15671581target given in the next item would have caught this problem.
15681582
15691583=end original
15701584
15711585テストスイートを実行します。
15721586一つのタイプミス修正がテストファイルを壊すとは思わないかもしれません。
15731587それは間違いです。
15741588スイートを実行しないと問題が発生する例を次に示します。
1575既存の .t にいくつかのテストを追加するパッチが提出されました。
1589既存の F<.t> にいくつかのテストを追加するパッチが提出されました。
15761590他の何にも影響する可能性はないので、
1577影響を受けた一つ以上をテストする必要はありません。
1591影響を受けた一つの F<.t> 以上をテストする必要はありません。
15781592そうですね?
15791593しかし、送信者のメールアドレスが前回の送信時から変更されていて、
15801594このための他のテストが失敗するようになりました。
15811595次の項目のテストターゲットを実行すると、この問題を捕まえられます。
15821596
15831597=item *
15841598
15851599=begin original
15861600
15871601If you don't run the full test suite, at least C<make test_porting>.
15881602This will run basic sanity checks. To see which sanity checks, have a
15891603look in F<t/porting>.
15901604
15911605=end original
15921606
15931607完全なテストスイートを実行しない場合でも、
15941608最低 C<make test_porting> は実行してください。
15951609これは基本的な正気チェックを実行します。
15961610どの正気チェックかを見るには、F<t/porting> を見てください。
15971611
15981612=item *
15991613
16001614=begin original
16011615
16021616If you make any changes that affect miniperl or core routines that have
16031617different code paths for miniperl, be sure to run C<make minitest>.
16041618This will catch problems that even the full test suite will not catch
16051619because it runs a subset of tests under miniperl rather than perl.
16061620
16071621=end original
16081622
16091623miniperl や miniperl のための異なるコードパスを持つコアルーチンに
16101624影響する変更を行う場合、C<make minitest> をするようにしてください。
16111625これは、perl ではなく miniperl でテストの一部を行うために完全な
16121626テストスイートでは捕捉できない問題も捕捉します。
16131627
16141628=back
16151629
1616=head3 On merging and rebasing
1630=head2 On merging and rebasing
16171631
16181632(マージとリベース時)
16191633
16201634=begin original
16211635
16221636Simple, one-off commits pushed to the 'blead' branch should be simple
16231637commits that apply cleanly. In other words, you should make sure your
16241638work is committed against the current position of blead, so that you can
16251639push back to the master repository without merging.
16261640
16271641=end original
16281642
16291643'blead' ブランチにプッシュされた、単純な 1 回限りのコミットは、
16301644クリーンに適用される単純なコミットであるべきです。
16311645言い換えると、作業したものは blead の現在の位置に対して
16321646コミットすることで、マージすることなく master に
16331647プッシュできるようにするべきです。
16341648
16351649=begin original
16361650
16371651Sometimes, blead will move while you're building or testing your
16381652changes. When this happens, your push will be rejected with a message
16391653like this:
16401654
16411655=end original
16421656
16431657あなたが変更したものをビルドしたりテストしたりしている間に、
16441658時々 blead は動きます。
16451659これが起きると、プッシュは次のようなメッセージで拒否されます:
16461660
1647 To ssh://perl5.git.perl.org/perl.git
1661 To ssh://perl5.git.perl.org/perl.git
1648 ! [rejected] blead -> blead (non-fast-forward)
1662 ! [rejected] blead -> blead (non-fast-forward)
1649 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl.git'
1663 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl.git'
1650 To prevent you from losing history, non-fast-forward updates were rejected
1664 To prevent you from losing history, non-fast-forward updates were
1651 Merge the remote changes (e.g. 'git pull') before pushing again. See the
1665 rejected Merge the remote changes (e.g. 'git pull') before pushing
1652 'Note about fast-forwards' section of 'git push --help' for details.
1666 again. See the 'Note about fast-forwards' section of 'git push --help'
1667 for details.
16531668
16541669=begin original
16551670
16561671When this happens, you can just I<rebase> your work against the new
16571672position of blead, like this (assuming your remote for the master
16581673repository is "p5p"):
16591674
16601675=end original
16611676
16621677これが起きた場合、次のようにして、blead の新しい位置に対してあなたの作業を
16631678単に I<リベース> します (master リポジトリに対するあなたのリモート名を
16641679"p5p" と仮定します):
16651680
1666 $ git fetch p5p
1681 % git fetch p5p
1667 $ git rebase p5p/blead
1682 % git rebase p5p/blead
16681683
16691684=begin original
16701685
16711686You will see your commits being re-applied, and you will then be able to
16721687push safely. More information about rebasing can be found in the
16731688documentation for the git-rebase(1) command.
16741689
16751690=end original
16761691
16771692コミットが再適用され、安全にプッシュできるようになります。
16781693リベースに関するさらなる情報は、git-rebase(1) コマンドの文書にあります。
16791694
16801695=begin original
16811696
16821697For larger sets of commits that only make sense together, or that would
16831698benefit from a summary of the set's purpose, you should use a merge
16841699commit. You should perform your work on a L<topic branch|/Topic
16851700branches and rewriting history>, which you should regularly rebase
16861701against blead to ensure that your code is not broken by blead moving.
16871702When you have finished your work, please perform a final rebase and
16881703test. Linear history is something that gets lost with every
16891704commit on blead, but a final rebase makes the history linear
16901705again, making it easier for future maintainers to see what has
16911706happened. Rebase as follows (assuming your work was on the
16921707branch C<< committer/somework >>):
16931708
16941709=end original
16951710
16961711一緒にすることでのみ意味がある、または集合の目的の要約としての
16971712価値があるような、より大きなコミットの集合に対しては、
16981713マージコミットを使うべきです。
16991714作業は L<トピックブランチ|/Topic
17001715branches and rewriting history> で行うべきです;
17011716そして、blead の移動によってあなたのコードが壊れていないことを
17021717確認するために定期的に blead に対してリベースするべきです。
17031718作業が終わったら、最後にリベースしてテストしてください。
17041719線形の履歴は blead にコミットされる度に失われますが、
17051720最後のリベースは再び履歴を線形にし、
17061721将来の保守者が何が起きたのかを見るのをより容易にします。
17071722次のようにしてリベースします (あなたの作業が
17081723C<< committer/somework >> ブランチにあると仮定します):
17091724
1710 $ git checkout committer/somework
1725 % git checkout committer/somework
1711 $ git rebase blead
1726 % git rebase blead
17121727
17131728=begin original
17141729
17151730Then you can merge it into master like this:
17161731
17171732=end original
17181733
17191734それから次のようにして master にマージできます:
17201735
1721 $ git checkout blead
1736 % git checkout blead
1722 $ git merge --no-ff --no-commit committer/somework
1737 % git merge --no-ff --no-commit committer/somework
1723 $ git commit -a
1738 % git commit -a
17241739
17251740=begin original
17261741
17271742The switches above deserve explanation. C<--no-ff> indicates that even
17281743if all your work can be applied linearly against blead, a merge commit
17291744should still be prepared. This ensures that all your work will be shown
17301745as a side branch, with all its commits merged into the mainstream blead
17311746by the merge commit.
17321747
17331748=end original
17341749
17351750前述のスイッチは説明が必要でしょう。
17361751C<--no-ff> は、たとえあなたの作業が blead に対して線形に適用可能でも、
17371752マージコミットが準備されることを示します。
17381753これによりあなたの作業は側道のブランチとして表示され、
17391754そのコミットはマージコミットによってメインの blead に
17401755マージされることになります。
17411756
17421757=begin original
17431758
17441759C<--no-commit> means that the merge commit will be I<prepared> but not
17451760I<committed>. The commit is then actually performed when you run the
17461761next command, which will bring up your editor to describe the commit.
17471762Without C<--no-commit>, the commit would be made with nearly no useful
17481763message, which would greatly diminish the value of the merge commit as a
17491764placeholder for the work's description.
17501765
17511766=end original
17521767
17531768C<--no-commit> は、マージコミットは I<準備> はされますが
17541769I<コミット> はされないことを意味します。
17551770コミットは実際には次のコマンドを実行して、
17561771コミットの説明のためにエディタが起動した後に実行されます。
17571772C<--no-commit> なしの場合、
17581773有用なメッセージなしでコミットが行われます;
17591774これは作業の説明のためのプレースホルダとしてマージコミットの価値を
17601775大幅に減らしてしまいます。
17611776
17621777=begin original
17631778
17641779When describing the merge commit, explain the purpose of the branch, and
17651780keep in mind that this description will probably be used by the
17661781eventual release engineer when reviewing the next perldelta document.
17671782
17681783=end original
17691784
17701785マージコミットの説明を書くとき、
17711786このブランチの目的を説明してください;
17721787そしてこの説明はおそらく次の perldelta 文書をレビューするときに
17731788最終的なリリースエンジニアによって使われるだろうということを
17741789心に留めておいてください。
17751790
17761791=head2 Committing to maintenance versions
17771792
17781793(メンテナンスバージョンにコミットする)
17791794
17801795=begin original
17811796
17821797Maintenance versions should only be altered to add critical bug fixes,
17831798see L<perlpolicy>.
17841799
17851800=end original
17861801
17871802メンテナンスバージョンは、重要なバグ修正を追加する場合にのみ変更してください;
17881803L<perlpolicy> を参照してください。
17891804
17901805=begin original
17911806
17921807To commit to a maintenance version of perl, you need to create a local
17931808tracking branch:
17941809
17951810=end original
17961811
17971812perl のメンテナンスバージョンにコミットするには、
17981813ローカル追跡ブランチを作成する必要があります。
17991814
18001815 % git checkout --track -b maint-5.005 origin/maint-5.005
18011816
18021817=begin original
18031818
18041819This creates a local branch named C<maint-5.005>, which tracks the
18051820remote branch C<origin/maint-5.005>. Then you can pull, commit, merge
18061821and push as before.
18071822
18081823=end original
18091824
18101825これにより、リモートブランチ C<origin/maint-5.005> を追跡する
18111826C<maint-5.005> という名前のローカルブランチが作成されます。
18121827次に、以前と同じようにプル、コミット、マージ、プッシュを行うことができます。
18131828
18141829=begin original
18151830
18161831You can also cherry-pick commits from blead and another branch, by
18171832using the C<git cherry-pick> command. It is recommended to use the
18181833B<-x> option to C<git cherry-pick> in order to record the SHA1 of the
18191834original commit in the new commit message.
18201835
18211836=end original
18221837
18231838C<git cherry-pick> コマンドを使用して、blead と別のブランチから
18241839コミットをチェリーピックすることもできます。
18251840元のコミットの SHA1 を新しいコミットメッセージに記録するために、
18261841C<git cherry-pick> に B<-x> オプションを使うことを勧めます。
18271842
18281843=begin original
18291844
18301845Before pushing any change to a maint version, make sure you've
18311846satisfied the steps in L</Committing to blead> above.
18321847
18331848=end original
18341849
18351850maint 版に何かをプッシュする前に、前述の
18361851L</Committing to blead> のステップを満たしていることを確認してください。
18371852
18381853=head2 Merging from a branch via GitHub
18391854
18401855(GitHub 経由のブランチをマージする)
18411856
18421857=begin original
18431858
18441859While we don't encourage the submission of patches via GitHub, that
18451860will still happen. Here is a guide to merging patches from a GitHub
18461861repository.
18471862
18481863=end original
18491864
18501865私たちはパッチを GitHub 経由で投稿することを勧めていませんが、
18511866実際発生します。
18521867これは GitHub リポジトリからのパッチをマージするためのガイドです。
18531868
18541869 % git remote add avar git://github.com/avar/perl.git
18551870 % git fetch avar
18561871
18571872=begin original
18581873
18591874Now you can see the differences between the branch and blead:
18601875
18611876=end original
18621877
18631878これで、そのブランチと blead の差分を見られるようになりました:
18641879
18651880 % git diff avar/orange
18661881
18671882=begin original
18681883
18691884And you can see the commits:
18701885
18711886=end original
18721887
18731888そしてコミットを表示できます:
18741889
18751890 % git log avar/orange
18761891
18771892=begin original
18781893
18791894If you approve of a specific commit, you can cherry pick it:
18801895
18811896=end original
18821897
18831898特定のコミットを承認する場合は、次のようにして選択できます:
18841899
18851900 % git cherry-pick 0c24b290ae02b2ab3304f51d5e11e85eb3659eae
18861901
18871902=begin original
18881903
18891904Or you could just merge the whole branch if you like it all:
18901905
18911906=end original
18921907
18931908または、必要に応じてブランチ全体をマージすることもできます:
18941909
18951910 % git merge avar/orange
18961911
18971912=begin original
18981913
18991914And then push back to the repository:
19001915
19011916=end original
19021917
19031918そして、リポジトリにプッシュバックします:
19041919
1905 % git push
1920 % git push origin blead
19061921
1922
1923=head2 Using a smoke-me branch to test changes
1924
1925(変更をテストするために smoke-me ブランチを使う)
1926
1927=begin original
1928
1929Sometimes a change affects code paths which you cannot test on the OSes
1930which are directly available to you and it would be wise to have users
1931on other OSes test the change before you commit it to blead.
1932
1933=end original
1934
1935時々、ある変更があなたが直接利用できない OS に関するテストできない
1936コードパスに影響することがあるので、
1937blead にコミットする前に他の OS のユーザーが変更をテストしてもらうのが
1938賢明です。
1939
1940=begin original
1941
1942Fortunately, there is a way to get your change smoke-tested on various
1943OSes: push it to a "smoke-me" branch and wait for certain automated
1944smoke-testers to report the results from their OSes.
1945
1946=end original
1947
1948幸い、様々な OS であなたの変更をスモークテストする方法があります:
1949これを "smoke-me" ブランチとしてプッシュして、いくつかの自動
1950smoke-testers が彼らの OS からの結果を報告するのを待ちます。
1951
1952=begin original
1953
1954The procedure for doing this is roughly as follows (using the example of
1955of tonyc's smoke-me branch called win32stat):
1956
1957=end original
1958
1959これをするための手順は大まかに次のようなものです
1960(tonyc による win32stat と呼ばれる smoke-me ブランチの例を使います):
1961
1962=begin original
1963
1964First, make a local branch and switch to it:
1965
1966=end original
1967
1968まず、ローカルブランチを作ってそれに切り替えます:
1969
1970 % git checkout -b win32stat
1971
1972=begin original
1973
1974Make some changes, build perl and test your changes, then commit them to
1975your local branch. Then push your local branch to a remote smoke-me
1976branch:
1977
1978=end original
1979
1980変更を行い、perl をビルドして変更をテストし、ローカルブランチに
1981コミットします。
1982それからローカルブランチをリモートの smoke-me ブランチにプッシュします:
1983
1984 % git push origin win32stat:smoke-me/tonyc/win32stat
1985
1986=begin original
1987
1988Now you can switch back to blead locally:
1989
1990=end original
1991
1992ここでローカルの blead に戻します:
1993
1994 % git checkout blead
1995
1996=begin original
1997
1998and continue working on other things while you wait a day or two,
1999keeping an eye on the results reported for your smoke-me branch at
2000L<http://perl.develop-help.com/?b=smoke-me/tonyc/win32state>.
2001
2002=end original
2003
2004そして他の作業をして数日待ち、smoke-me ブランチに対する報告される結果
2005L<http://perl.develop-help.com/?b=smoke-me/tonyc/win32state> を注視します。
2006
2007=begin original
2008
2009If all is well then update your blead branch:
2010
2011=end original
2012
2013全てがうまくいっていれば、手元の blead ブランチを更新します:
2014
2015 % git pull
2016
2017=begin original
2018
2019then checkout your smoke-me branch once more and rebase it on blead:
2020
2021=end original
2022
2023それからもう一度手元の smoke-me ブランチをチェックアウトして、
2024それを blead にリベースします:
2025
2026 % git rebase blead win32stat
2027
2028=begin original
2029
2030Now switch back to blead and merge your smoke-me branch into it:
2031
2032=end original
2033
2034ここで blead に戻して、smoke-me ブランチをマージします:
2035
2036 % git checkout blead
2037 % git merge win32stat
2038
2039=begin original
2040
2041As described earlier, if there are many changes on your smoke-me branch
2042then you should prepare a merge commit in which to give an overview of
2043those changes by using the following command instead of the last
2044command above:
2045
2046=end original
2047
2048前述したように、smoke-me ブランチに多くの変更がある場合は、
2049前述の最後のコマンドの代わりに次のコマンドを使うことで、
2050これらの変更の概要を記録するためのマージコミットを準備するべきです:
2051
2052 % git merge win32stat --no-ff --no-commit
2053
2054=begin original
2055
2056You should now build perl and test your (merged) changes one last time
2057(ideally run the whole test suite, but failing that at least run the
2058F<t/porting/*.t> tests) before pushing your changes as usual:
2059
2060=end original
2061
2062ここで perl をビルドして、いつものように変更をプッシュする前に、
2063あなたの(マージされた)変更を最後にもう一度テストするべきです
2064(理想的には、テストスイート全体を実行します; しかし、
2065少なくとも F<t/porting/*.t> テストを実行します) 。
2066
2067 % git push origin blead
2068
2069=begin original
2070
2071Finally, you should then delete the remote smoke-me branch:
2072
2073=end original
2074
2075最後に、リモートの smoke-me ブランチを削除して:
2076
2077 % git push origin :smoke-me/tonyc/win32stat
2078
2079=begin original
2080
2081(which is likely to produce a warning like this, which can be ignored:
2082
2083=end original
2084
2085(これはおそらく次のような警告を出しますが、無視できます:
2086
2087 remote: fatal: ambiguous argument
2088 'refs/heads/smoke-me/tonyc/win32stat':
2089 unknown revision or path not in the working tree.
2090 remote: Use '--' to separate paths from revisions
2091
2092=begin original
2093
2094) and then delete your local branch:
2095
2096=end original
2097
2098) そしてローカルブランチを削除します:
2099
2100 % git branch -d win32stat
2101
19072102=head2 A note on camel and dromedary
19082103
19092104(camel と dromedary に関する注意)
19102105
19112106=begin original
19122107
19132108The committers have SSH access to the two servers that serve
19142109C<perl5.git.perl.org>. One is C<perl5.git.perl.org> itself (I<camel>),
19152110which is the 'master' repository. The second one is
19162111C<users.perl5.git.perl.org> (I<dromedary>), which can be used for
19172112general testing and development. Dromedary syncs the git tree from
19182113camel every few minutes, you should not push there. Both machines also
1919have a full CPAN mirror in /srv/CPAN, please use this. To share files
2114have a full CPAN mirror in F</srv/CPAN>, please use this. To share files
1920with the general public, dromedary serves your ~/public_html/ as
2115with the general public, dromedary serves your F<~/public_html/> as
19212116C<http://users.perl5.git.perl.org/~yourlogin/>
19222117
19232118=end original
19242119
19252120コミッタは、C<perl5.git.perl.org> にサービスを提供する二つの
19262121サーバにアクセスできます。
19272122C<perl5.git.perl.org> 自身 (I<camel>) で、
19282123これが「マスター」リポジトリです。
19292124二つ目は C<users.perl5.git.perl.org> (I<dromedary>) で、
19302125一般的なテストと開発に使用できます。
19312126dromedary は数分ごとに camel から git ツリーを同期するので、そこに
19322127プッシュしてはいけません。
1933両方のマシンには /srv/CPAN に完全な CPAN ミラーもあるので、
2128両方のマシンには F</srv/CPAN> に完全な CPAN ミラーもあるので、
19342129これを使ってください。
19352130dromedary はファイルを一般公開するために、
1936~/public_html/ を C<http://users.perl5.git.perl.org/~yourlogin/> として
2131F<~/public_html/> を C<http://users.perl5.git.perl.org/~yourlogin/> として
19372132提供しています。
19382133
19392134=begin original
19402135
19412136These hosts have fairly strict firewalls to the outside. Outgoing, only
19422137rsync, ssh and git are allowed. For http and ftp, you can use
19432138http://webproxy:3128 as proxy. Incoming, the firewall tries to detect
19442139attacks and blocks IP addresses with suspicious activity. This
19452140sometimes (but very rarely) has false positives and you might get
19462141blocked. The quickest way to get unblocked is to notify the admins.
19472142
19482143=end original
19492144
19502145これらのホストは、外部に対してかなり厳格なファイアウォールを持っています。
19512146送信は rsync、ssh、git だけが許可されています。
19522147http と ftp に対しては、プロキシとして http://webproxy:3128 を使用できます。
19532148受信は、ファイアウォールは攻撃を検出し、疑わしいアクティビティを持つ
19542149IP アドレスをブロックしようとします。
19552150これは時に(非常にまれに)誤検出があり、ブロックされる可能性があります。
19562151ブロックを解除する最も簡単な方法は、管理者に通知することです。
19572152
19582153=begin original
19592154
19602155These two boxes are owned, hosted, and operated by booking.com. You can
19612156reach the sysadmins in #p5p on irc.perl.org or via mail to
1962C<perl5-porters@perl.org>.
2157L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>.
19632158
19642159=end original
19652160
19662161これら二つのボックスは、booking.com によって所有され、ホストされ、
19672162運営されています。
19682163システム管理者には、irc.perl.org の #p5p か、
1969C<perl5-porters@perl.org> へのメールで連絡できます。
2164L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> へのメールで
2165連絡できます。
19702166
19712167=begin meta
19722168
19732169Translate: SHIRAKATA Kentaro <argrath@ub32.org>
19742170Status: completed
19752171
19762172=end meta