perlgit > 5.22.1 との差分

perlgit 5.22.1 と 5.32.0 の差分

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
42I<perl5.git.perl.org>.
42I<github.com>.
4343
4444=end original
4545
46Perlのソースコードはすべて、I<perl5.git.perl.org> の Git リポジトリに
46Perlのソースコードはすべて、I<github.com> の 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
57 % git clone git://perl5.git.perl.org/perl.git perl
57 % git clone git://github.com/Perl/perl5.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
70clone via http, though this is much slower:
70clone via http:
7171
7272=end original
7373
7474ファイアウォールの関係で git プロトコルが使えない場合、
75http 経由でもクローンできますが、はるかに遅いです:
75http 経由でもクローンできます:
7676
77 % git clone http://perl5.git.perl.org/perl.git perl
77 % git clone https://github.com/Perl/perl5.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
482maximum.
483maximum. See L<perlhack/Commit message> for more information about what
484makes a good commit message.
483485
484486=end original
485487
486488C<-m> オプションはコミットメッセージを指定するために使われます。
487489これを省略すると、git はメッセージを対話的に作成するために
488490テキストエディタを開きます。
489491これは、変更がここで指定するサンプルよりも複雑な場合、そして
490492エディタによっては、コミットメッセージの先頭行が上限の
49149350 文字を超えないことを知るために有用です。
494よいコミットメッセージとは何かということに関するさらなる情報については
495L<perlhack/Commit message> を参照してください。
492496
493497=begin original
494498
495499Once you've finished writing your commit message and exited your
496500editor, git will write your change to disk and tell you something like
497501this:
498502
499503=end original
500504
501505コミットメッセージを書き終えてエディタを終了すると、
502506git は変更をディスクに書き込み、以下のようなメッセージを出力します:
503507
504 Created commit daf8e63: explain git status and stuff about remotes
508 Created commit daf8e63: explain git status and stuff about remotes
505 1 files changed, 83 insertions(+), 3 deletions(-)
509 1 files changed, 83 insertions(+), 3 deletions(-)
506510
507511=begin original
508512
509513If you re-run C<git status>, you should see something like this:
510514
511515=end original
512516
513517C<git status> を再実行すると、次のようなものが表示されます:
514518
515 % git status
519 % git status
516 # On branch blead
520 On branch orange
517 # Your branch is ahead of 'origin/blead' by 2 commits.
521 Untracked files:
518 #
522 (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)
524523
524 deliberate.untracked
525
526 nothing added to commit but untracked files present (use "git add" to
527 track)
528
525529=begin original
526530
527531When in doubt, before you do anything else, check your status and read
528532it carefully, many questions are answered directly by the git status
529533output.
530534
531535=end original
532536
533537疑わしいときには、他のことをする前に、ステータスをチェックして
534538注意深く読んでください;
535539多くの疑問は git status の出力で直接応えられています。
536540
537541=begin original
538542
539543You can examine your last commit with:
540544
541545=end original
542546
543547最後のコミットを以下のようにして検査できます:
544548
545549 % git show HEAD
546550
547551=begin original
548552
549553and if you are not happy with either the description or the patch
550554itself you can fix it up by editing the files once more and then issue:
551555
552556=end original
553557
554558説明またはパッチ自体に満足できない場合は、ファイルをもう一度編集してから
555559次のコマンドを発行することで修正できます:
556560
557561 % git commit -a --amend
558562
559563=begin original
560564
561Now you should create a patch file for all your local changes:
565Now, create a fork on GitHub to push your branch to, and add it as a
566remote if you haven't already, as described in the GitHub documentation
567at L<https://help.github.com/en/articles/working-with-forks>:
562568
563569=end original
564570
565ここで全てローカルな変更のためのパッファイルべきす:
571ここで、こブランチをプッシュすために GitHub 上フォークし、
572もしまだならこれをリモートとして追加します;
573これは GitHub 文書
574L<https://help.github.com/en/articles/working-with-forks> に記述されています:
566575
567 % git format-patch -M blead..
576 % git remote add fork git@github.com:MyUser/perl5.git
568 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
569577
570578=begin original
571579
572Or for a lot of changes, e.g. from a topic branch:
580And push the branch to your fork:
573581
574582=end original
575583
576あるいは変更が多い場合、つまりトピックブランチからは:
584そしてフォーしたブランチをプッシュします:
577585
578 % git format-patch --stdout -M blead.. > topic-branch-changes.patch
586 % git push -u fork orange
579587
580588=begin original
581589
582You should now send an email to
590You should now submit a Pull Request (PR) on GitHub from the new branch
583L<perlbug@perl.org|mailto:perlbug@perl.org> with a description of your
591to blead. For more information, see the GitHub documentation at
584changes, and include this patch file as an attachment. In addition to
592L<https://help.github.com/en/articles/creating-a-pull-request-from-a-fork>.
585being tracked by RT, mail to perlbug will automatically be forwarded to
586perl5-porters (with manual moderation, so please be patient). You
587should only send patches to
588L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> directly if the
589patch is not ready to be applied, but intended for discussion.
590593
591594=end original
592595
593L<perlbug@perl.org|mailto:perlbug@perl.org> 宛に変更内容を記載した
596ここで新しいブランチから blead へのプルリクエスト (PR) を GitHub
594メールを送信し、このパッチファイルを添付ファイルとして送ってください
597登録する必要があります
595RT で追跡すこと加えて、
598更な情報ついGitHub 文書
596perlbug にメールすると、自動的に
599L<https://help.github.com/en/articles/creating-a-pull-request-from-a-fork>
597perl5-porters に (手動のモデレーションの後、従っ気長に待ってください)
600参照してください
598転送されます。
599パッチは適用する準備ができていない状態だけれども議論したい場合は、
600L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> だけに
601直接メールを送るべきです。
602601
603602=begin original
604603
605Please do not use git-send-email(1) to send your patch. See L<Sending
604You can also send patch files to
606patch emails|/Sending patch emails> for more information.
605L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> directly if the
606patch is not ready to be applied, but intended for discussion.
607607
608608=end original
609609
610パッチを送のに git-send-email(1) 使わいでください。
610パッチが適用でき準備ができておらず、議論目的としたものら、
611さらなる情報ついては
611L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
612L<Sending patch emails|/Sending patch emails> 参照してください
612直接パッチファイル送ることもできます
613613
614614=begin original
615615
616If you want to delete your temporary branch, you may do so with:
616To create a patch file for all your local changes:
617617
618618=end original
619619
620一時的ブランチを削除しいなら、以下ようできます:
620全てのローカル変更のパッチファイルを作る:
621621
622 % git checkout blead
622 % git format-patch -M blead..
623 % git branch -d orange
623 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
624 error: The branch 'orange' is not an ancestor of your current HEAD.
625 If you are sure you want to delete it, run 'git branch -D orange'.
626 % git branch -D orange
627 Deleted branch orange.
628624
629=head2 Committing your changes
630
631(変更をコミットする)
632
633625=begin original
634626
635Assuming that you'd like to commit all the changes you've made as a
627Or for a lot of changes, e.g. from a topic branch:
636single atomic unit, run this command:
637628
638629=end original
639630
640今行ったすべての変更を一のアックユニットとしてコミットしたい場合
631あるいは変更が多い場合、まりックブランチから:
641次のコマンドを実行します:
642632
643 % git commit -a
633 % git format-patch --stdout -M blead.. > topic-branch-changes.patch
644634
645635=begin original
646636
647(That C<-a> tells git to add every file you've changed to this commit.
637If you want to delete your temporary branch, you may do so with:
648New files aren't automatically added to your commit when you use
649C<commit -a> If you want to add files or to commit some, but not all of
650your changes, have a look at the documentation for C<git add>.)
651638
652639=end original
653640
654(C<-a> は git に対て、変更しすべてファイルをこのコミット
641一時的なブランチを削除したいなら、以下ようできます:
655追加するように指示します。
656C<commit -a> を使用しても、新しいファイルは自動的にコミットに追加されません。
657ファイルを追加したい場合や、一部の変更をコミットしたい場合は、
658C<git add> の文書を参照してください。
659642
660=begin original
643 % git checkout blead
644 % git branch -d orange
645 error: The branch 'orange' is not an ancestor of your current HEAD.
646 If you are sure you want to delete it, run 'git branch -D orange'.
647 % git branch -D orange
648 Deleted branch orange.
661649
662Git will start up your favorite text editor, so that you can craft a
663commit message for your change. See L<perlhack/Commit message> for more
664information about what makes a good commit message.
665
666=end original
667
668Git は、あなたが変更内容のコミットメッセージを作成できるように、
669お気に入りのテキストエディタを起動します。
670適切なコミットメッセージを作成する方法に関するさらなる情報については、
671L</Commit message> を参照してください。
672
673=begin original
674
675Once you've finished writing your commit message and exited your
676editor, git will write your change to disk and tell you something like
677this:
678
679=end original
680
681コミットメッセージを書き終えてエディタを終了すると、
682git は変更をディスクに書き込み、以下のようなメッセージを出力します:
683
684 Created commit daf8e63: explain git status and stuff about remotes
685 1 files changed, 83 insertions(+), 3 deletions(-)
686
687=begin original
688
689If you re-run C<git status>, you should see something like this:
690
691=end original
692
693C<git status> を再実行すると、次のようなものが表示されます:
694
695 % git status
696 # On branch blead
697 # Your branch is ahead of 'origin/blead' by 2 commits.
698 #
699 # Untracked files:
700 # (use "git add <file>..." to include in what will be committed)
701 #
702 # deliberate.untracked
703 nothing added to commit but untracked files present (use "git add" to track)
704
705=begin original
706
707When in doubt, before you do anything else, check your status and read
708it carefully, many questions are answered directly by the git status
709output.
710
711=end original
712
713何か疑問がある場合には、何かをする前に自分のステータスをチェックして
714注意深く読んでください;
715多くの疑問に対しては、git status 出力が直接答えてくれます。
716
717=head2 Sending patch emails
718
719(パッチをメールする)
720
721=begin original
722
723After you've generated your patch you should sent it
724to perlbug@perl.org (as discussed L<in the previous
725section|/"Patch workflow">) with a normal mail client as an
726attachment, along with a description of the patch.
727
728=end original
729
730パッチを作ったら、
731(L<前の節|/"Patch workflow"> で議論したように)
732それを添付ファイルにして、パッチの説明と共に、
733通常のメールクライアントで perlbug@perl.org に送ってください。
734
735=begin original
736
737You B<must not> use git-send-email(1) to send patches generated with
738git-format-patch(1). The RT ticketing system living behind
739perlbug@perl.org does not respect the inline contents of E-Mails,
740sending an inline patch to RT guarantees that your patch will be
741destroyed.
742
743=end original
744
745git-format-patch(1) で生成したパッチを送るのに git-send-email(1) を
746使っては B<いけません>。
747perlbug@perl.org の後ろで動いている RT チケットシステムは、
748電子メールのインラインコンテンツを認識しないので、
749RT にインラインでパッチを送ると、パッチは破壊されます。
750
751=begin original
752
753Someone may download your patch from RT, which will result in the
754subject (the first line of the commit message) being omitted. See RT
755#74192 and commit a4583001 for an example. Alternatively someone may
756apply your patch from RT after it arrived in their mailbox, by which
757time RT will have modified the inline content of the message. See RT
758#74532 and commit f9bcfeac for a bad example of this failure mode.
759
760=end original
761
762誰かが RT からパッチをダウンロードすると、題名 (コミットメッセージの
763最初の行) は削除されます。
764例えば RT #74192 とコミット a4583001 を参照してください。
765あるいは、誰かがメールボックスに届いた RT からのパッチを
766適用するかもしれません; この場合 RT はメッセージのインラインコンテンツを
767変更しています。
768この失敗に関する悪い例は RT #74532 とコミット f9bcfeac を参照してください。
769
770650=head2 A note on derived files
771651
772652(派生ファイルに関する注意)
773653
774654=begin original
775655
776656Be aware that many files in the distribution are derivative--avoid
777657patching them, because git won't see the changes to them, and the build
778658process will overwrite them. Patch the originals instead. Most
779659utilities (like perldoc) are in this category, i.e. patch
780660F<utils/perldoc.PL> rather than F<utils/perldoc>. Similarly, don't
781create patches for files under $src_root/ext from their copies found in
661create patches for files under F<$src_root/ext> from their copies found
782$install_root/lib. If you are unsure about the proper location of a
662in F<$install_root/lib>. If you are unsure about the proper location of
783file that may have gotten copied while building the source
663a file that may have gotten copied while building the source
784distribution, consult the C<MANIFEST>.
664distribution, consult the F<MANIFEST>.
785665
786666=end original
787667
788668ディストリビューション内の多くのファイルは
789669派生的なものであることに注意してください --
790670それらのファイルにパッチを当てることは避けてください;
791671なぜなら、git はそれらに対する変更を見ることができず、
792672ビルドプロセスがそれらを上書きするからです。
793673代わりにオリジナルにパッチを当ててください。
794674ほとんどのユーティリティ(perldoc など)はこのカテゴリにあります;
795675すなわち、utils/perldoc ではなく F<utils/perldoc.PL> にパッチを当てます。
796同様に、$install_root/lib にあるコピーから $src_root/ext 以下のファイルに
676同様に、F<$install_root/lib> にあるコピーから F<$src_root/ext> 以下のファイルに
797677パッチを作成しないでください。
798678ソースディストリビューションのビルド中にコピーされた可能性のあるファイルの
799適切な場所がわからない場合は、C<MANIFEST> を調べてください。
679適切な場所がわからない場合は、F<MANIFEST> を調べてください。
800680
801681=head2 Cleaning a working directory
802682
803683(作業ディレクトリを掃除する)
804684
805685=begin original
806686
807687The command C<git clean> can with varying arguments be used as a
808688replacement for C<make clean>.
809689
810690=end original
811691
812692C<git clean> コマンドはさまざまな引数で C<make clean> の代わりに
813693使うことができます。
814694
815695=begin original
816696
817697To reset your working directory to a pristine condition you can do:
818698
819699=end original
820700
821701作業ディレクトリを初期状態にリセットするには、次のようにします:
822702
823703 % git clean -dxf
824704
825705=begin original
826706
827707However, be aware this will delete ALL untracked content. You can use
828708
829709=end original
830710
831711ただし、これによりすべての追跡されていないコンテンツが削除されます。
832712次のようにすると:
833713
834714 % git clean -Xf
835715
836716=begin original
837717
838718to remove all ignored untracked files, such as build and test
839byproduct, but leave any manually created files alone.
719byproduct, but leave any manually created files alone.
840720
841721=end original
842722
843723ビルドやテストの副産物など、すべての無視された
844724追跡されていないファイルを削除します。
845725ただし、手動で作成したファイルは残します。
846726
847727=begin original
848728
849729If you only want to cancel some uncommitted edits, you can use C<git
850730checkout> and give it a list of files to be reverted, or C<git checkout
851731-f> to revert them all.
852732
853733=end original
854734
855735コミットされていない編集だけをキャンセルしたい場合は、
856736C<git checkout> を使用して元に戻すファイルのリストを与えるか、
857737C<git checkout -f> を使用してすべてを元に戻すことができます。
858738
859739=begin original
860740
861741If you want to cancel one or several commits, you can use C<git reset>.
862742
863743=end original
864744
8657451つまたは複数のコミットをキャンセルしたい場合は、C<git reset> を
866746使うことができます。
867747
868748=head2 Bisecting
869749
870750(bisect)
871751
872752=begin original
873753
874754C<git> provides a built-in way to determine which commit should be blamed
875755for introducing a given bug. C<git bisect> performs a binary search of
876756history to locate the first failing commit. It is fast, powerful and
877757flexible, but requires some setup and to automate the process an auxiliary
878758shell script is needed.
879759
880760=end original
881761
882762C<git> は、指定されたバグが導入されたのがどのコミットに責任があるかを
883763決定する組み込みの手段を提供しています。
884764C<git bisect> は失敗する最初のコミットを特定するために
885765履歴の二分検索を行います。
886766これは高速で強力で柔軟性がありますが、多少の準備が必要で、
887767処理を自動化するには外部シェルスクリプトが必要です。
888768
889769=begin original
890770
891771The core provides a wrapper program, F<Porting/bisect.pl>, which attempts to
892772simplify as much as possible, making bisecting as simple as running a Perl
893773one-liner. For example, if you want to know when this became an error:
894774
895775=end original
896776
897777コアはラッパプログラムである F<Porting/bisect.pl> を提供しています;
898778これはできるだけ作業を単純化して、
899779Perl のワンライナーを実行するだけで bisect ができるようにします。
900780例えば、次のものがいつエラーになったかを知りたい場合:
901781
902782 perl -e 'my $a := 2'
903783
904784=begin original
905785
906786you simply run this:
907787
908788=end original
909789
910790単純にこれを実行します:
911791
912792 .../Porting/bisect.pl -e 'my $a := 2;'
913793
914794=begin original
915795
916Using C<bisect.pl>, with one command (and no other files) it's easy to find
796Using F<Porting/bisect.pl>, with one command (and no other files) it's easy to
917out
797find out
918798
919799=end original
920800
921C<bisect.pl> を (他のファイルなしで) 一つのコマンドで使うことで、
801F<Porting/bisect.pl> を (他のファイルなしで) 一つのコマンドで使うことで、
922802次のものを簡単に見つけられます:
923803
924804=over 4
925805
926806=item *
927807
928808=begin original
929809
930810Which commit caused this example code to break?
931811
932812=end original
933813
934814どのコミットがこの例のコードを壊しているか
935815
936816=item *
937817
938818=begin original
939819
940820Which commit caused this example code to start working?
941821
942822=end original
943823
944824どのコミットからこの例のコードが動作し始めているか
945825
946826=item *
947827
948828=begin original
949829
950830Which commit added the first file to match this regex?
951831
952832=end original
953833
954834どのコミットが最初にこの正規表現にマッチングするファイルを追加したか
955835
956836=item *
957837
958838=begin original
959839
960840Which commit removed the last file to match this regex?
961841
962842=end original
963843
964844どのコミットが最後にこの正規表現にマッチングするファイルを削除したか
965845
966846=back
967847
968848=begin original
969849
970850usually without needing to know which versions of perl to use as start and
971end revisions, as F<bisect.pl> automatically searches to find the earliest
851end revisions, as F<Porting/bisect.pl> automatically searches to find the
972stable version for which the test case passes. Run
852earliest stable version for which the test case passes. Run
973853C<Porting/bisect.pl --help> for the full documentation, including how to
974854set the C<Configure> and build time options.
975855
976856=end original
977857
978858通常はどのバージョンの perl を使うかの始点と終点のリビジョンを
979知っている必要はありません;
859知っている必要はありません; F<Porting/bisect.pl> は自動的に、
980F<bisect.pl> は自動的に、テストケースが通過する最初の安定版バージョンを
860テストケースが通過する最初の安定版バージョンを探します。
981探します。
982861C<Configure> とビルド時オプションを含む完全な文書を見るには
983862C<Porting/bisect.pl --help> を実行してください。
984863
985864=begin original
986865
987866If you require more flexibility than F<Porting/bisect.pl> has to offer, you'll
988867need to run C<git bisect> yourself. It's most useful to use C<git bisect run>
989868to automate the building and testing of perl revisions. For this you'll need
990869a shell script for C<git> to call to test a particular revision. An example
991870script is F<Porting/bisect-example.sh>, which you should copy B<outside> of
992871the repository, as the bisect process will reset the state to a clean checkout
993872as it runs. The instructions below assume that you copied it as F<~/run> and
994873then edited it as appropriate.
995874
996875=end original
997876
998877F<Porting/bisect.pl> が提供しているものよりもさらに柔軟性が必要な場合、
999878C<git bisect> を自分自身で実行する必要があります。
1000879perl リビジョンのビルドとテストを自動化するために
1001880C<git bisect run> を使うのが最も便利です。
1002881このために、特定のリビジョンをテストするために呼び出すための
1003882C<git> のためのシェルスクリプトが必要です。
1004883例のスクリプトは F<Porting/bisect-example.sh> で、
1005884これはリポジトリの B<外側> にコピーするべきです;
1006885bisect 処理は、実行されるとクリーンなチェックアウトのために
1007886状態をリセットするからです。
1008887後述の説明は、スクリプトを F<~/run> としてコピーして、それを
1009888適切に編集することを仮定しています。
1010889
1011890=begin original
1012891
1013892You first enter in bisect mode with:
1014893
1015894=end original
1016895
1017896まず bisect モードに入ります:
1018897
1019898 % git bisect start
1020899
1021900=begin original
1022901
1023902For example, if the bug is present on C<HEAD> but wasn't in 5.10.0,
1024903C<git> will learn about this when you enter:
1025904
1026905=end original
1027906
1028907例えば、バグが C<HEAD> にあっても 5.10.0 にはなかった場合、C<git> は
1029908以下のように入力することでこれを学習します:
1030909
1031910 % git bisect bad
1032911 % git bisect good perl-5.10.0
1033912 Bisecting: 853 revisions left to test after this
1034913
1035914=begin original
1036915
1037916This results in checking out the median commit between C<HEAD> and
1038917C<perl-5.10.0>. You can then run the bisecting process with:
1039918
1040919=end original
1041920
1042921この結果、C<HEAD> と C<perl-5.10.0> の中間のコミットが
1043922チェックアウトされます。
1044923次のようにして bisect 処理を実行します:
1045924
1046925 % git bisect run ~/run
1047926
1048927=begin original
1049928
1050929When the first bad commit is isolated, C<git bisect> will tell you so:
1051930
1052931=end original
1053932
1054933最初の不正なコミットが分離されると、C<git bisect> は次のように言います:
1055934
1056935 ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 is first bad commit
1057936 commit ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5
1058937 Author: Dave Mitchell <davem@fdisolutions.com>
1059938 Date: Sat Feb 9 14:56:23 2008 +0000
1060939
1061940 [perl #49472] Attributes + Unknown Error
1062941 ...
1063942
1064943 bisect run success
1065944
1066945=begin original
1067946
1068947You can peek into the bisecting process with C<git bisect log> and
1069948C<git bisect visualize>. C<git bisect reset> will get you out of bisect
1070949mode.
1071950
1072951=end original
1073952
1074953C<git bisect log> と C<git bisect visualize> で bisect 処理を
1075954覗き見ることができます。
1076955C<git bisect reset>は bisect モードを解除します。
1077956
1078957=begin original
1079958
1080959Please note that the first C<good> state must be an ancestor of the
1081960first C<bad> state. If you want to search for the commit that I<solved>
1082961some bug, you have to negate your test case (i.e. exit with C<1> if OK
1083962and C<0> if not) and still mark the lower bound as C<good> and the
1084963upper as C<bad>. The "first bad commit" has then to be understood as
1085964the "first commit where the bug is solved".
1086965
1087966=end original
1088967
1089968最初の C<good> 状態は、最初の C<bad> 状態の祖先である必要があることに
1090969注意してください。
1091970何らかのバグを I<解決した> コミットを検索したい場合は、テストケースを
1092971反転させ、
1093972(つまり、OK なら C<1> で終了し、そうでないなら C<0> で終了する)、
1094973下限を C<good>、上限を C<bad> とマークする必要があります。
1095974「最初の不正なコミット」は、「バグが解決された最初のコミット」と
1096975解釈する必要があります。
1097976
1098977=begin original
1099978
1100979C<git help bisect> has much more information on how you can tweak your
1101980binary searches.
1102981
1103982=end original
1104983
1105984C<git help bisect> には、二分探索を微調整する方法に関する情報が豊富に
1106985用意されています。
1107986
987=begin original
988
989Following bisection you may wish to configure, build and test perl at
990commits identified by the bisection process. Sometimes, particularly
991with older perls, C<make> may fail during this process. In this case
992you may be able to patch the source code at the older commit point. To
993do so, please follow the suggestions provided in
994L<perlhack/Building perl at older commits>.
995
996=end original
997
998bisect の後、bisect 処理で識別されたコミットの時点で perl を設定、
999ビルド、テストしたいと思うかもしれません。
1000時々、特に古い perl では、この処理中に C<make> が失敗することがあります。
1001この場合、古いコミットのポイントでソースコードにパッチを当てることが
1002できるかもしれません。
1003そうするためには、
1004L<perlhack/Building perl at older commits> で提供されている提案に
1005従ってください。
1006
11081007=head2 Topic branches and rewriting history
11091008
11101009(トピックブランチと履歴の書き換え)
11111010
11121011=begin original
11131012
11141013Individual committers should create topic branches under
1115B<yourname>/B<some_descriptive_name>. Other committers should check
1014B<yourname>/B<some_descriptive_name>:
1116with a topic branch's creator before making any change to it.
11171015
11181016=end original
11191017
11201018個々のコミッターは、B<yourname>/B<some_descriptive_name>
1121の下にトピックブランチを作成する必要があります
1019の下にトピックブランチを作成する必要があります:
1122他のコミッターは、トピックブランチに変更を加える前に、その作成者に
1123確認する必要があります。
11241020
1021 % branch="$yourname/$some_descriptive_name"
1022 % git checkout -b $branch
1023 ... do local edits, commits etc ...
1024 % git push origin -u $branch
1025
11251026=begin original
11261027
1127The simplest way to create a remote topic branch that works on all
1028Should you be stuck with an ancient version of git (prior to 1.7), then
1128versions of git is to push the current head as a new branch on the
1029C<git push> will not have the C<-u> switch, and you have to replace the
1129remote, then check it out locally:
1030last step with the following sequence:
11301031
11311032=end original
11321033
1133すべバージョンの git で動作する、リモートトピックブランチ作成す
1034も古いバージョン (1.7 より前) の git をまだ使ってい場合、
1134最も簡単な方法は、現在の head をリモートの新しいブランチとしてュし、
1035C<git push> には C<-u> オプションがありません;
1135ローカルチェックアウトすことで
1036最後の手順を次のもの置き換え必要がありま:
11361037
1137 $ branch="$yourname/$some_descriptive_name"
1038 % git push origin $branch:refs/heads/$branch
1138 $ git push origin HEAD:$branch
1039 % git config branch.$branch.remote origin
1139 $ git checkout -b $branch origin/$branch
1040 % git config branch.$branch.merge refs/heads/$branch
11401041
11411042=begin original
11421043
1143Users of git 1.7 or newer can do it in a more obvious manner:
1044If you want to make changes to someone else's topic branch, you should
1045check with its creator before making any change to it.
11441046
11451047=end original
11461048
1147git 1.7 以降ユーザは、もっと明らかな方法使うことが出来ま:
1049人のトピックブランチ変更したい場合、変更る前に
1050その作成者に確認する必要があります。
11481051
1149 $ branch="$yourname/$some_descriptive_name"
1150 $ git checkout -b $branch
1151 $ git push origin -u $branch
1152
11531052=begin original
11541053
1155If you are not the creator of B<yourname>/B<some_descriptive_name>, you
1054You
11561055might sometimes find that the original author has edited the branch's
11571056history. There are lots of good reasons for this. Sometimes, an author
11581057might simply be rebasing the branch onto a newer source point.
11591058Sometimes, an author might have found an error in an early commit which
11601059they wanted to fix before merging the branch to blead.
11611060
11621061=end original
11631062
1164B<yourname>/B<some_descriptive_name> の作成者でない場合、元の作成者が
1063元の作成者がブランチの履歴を編集したことに気付くことがあります。
1165ブランチの履歴を編集したことに気付くことがあります。
11661064これには多くの正当な理由があります。
11671065場合によっては、単にブランチを新しいソースポイントに基づいて
11681066作り直すことになることもあります。
11691067場合によっては、ブランチを blead にマージする前に、
11701068初期のコミットで修正したいエラーを見つけたこともあります。
11711069
11721070=begin original
11731071
11741072Currently the master repository is configured to forbid
11751073non-fast-forward merges. This means that the branches within can not be
11761074rebased and pushed as a single step.
11771075
11781076=end original
11791077
11801078現在、マスターリポジトリは、非 fast-forward のマージを禁止するように
11811079構成されています。
11821080これは、中のブランチはリベースとプッシュを単一ステップとしては
11831081できないことを意味します。
11841082
11851083=begin original
11861084
11871085The only way you will ever be allowed to rebase or modify the history
11881086of a pushed branch is to delete it and push it as a new branch under
11891087the same name. Please think carefully about doing this. It may be
11901088better to sequentially rename your branches so that it is easier for
11911089others working with you to cherry-pick their local changes onto the new
11921090version. (XXX: needs explanation).
11931091
11941092=end original
11951093
11961094プッシュされたブランチの履歴を再取得または変更する唯一の方法は、
11971095そのブランチを削除し、同じ名前で新しいブランチとしてプッシュすることです。
11981096これを行うことについては慎重に検討してください。
11991097他のユーザーが新しいバージョンにローカルの変更を簡単に
12001098チェリーピックできるように、
12011099ブランチの名前を順番に変更した方がよい場合があります(XXX:説明が必要)。
12021100
12031101=begin original
12041102
12051103If you want to rebase a personal topic branch, you will have to delete
12061104your existing topic branch and push as a new version of it. You can do
12071105this via the following formula (see the explanation about C<refspec>'s
12081106in the git push documentation for details) after you have rebased your
12091107branch:
12101108
12111109=end original
12121110
12131111個人的なトピックブランチをリベースしたい場合は、
12141112既存のトピックブランチを削除し、新しいバージョンとして
12151113プッシュする必要があります。
12161114これは、ブランチをリベースした後、次の公式
12171115(詳細は git push 文書の C<refspec> に関する説明を参照)で行うことができます。
12181116
1219 # first rebase
1117 # first rebase
1220 $ git checkout $user/$topic
1118 % git checkout $user/$topic
1221 $ git fetch
1119 % git fetch
1222 $ git rebase origin/blead
1120 % git rebase origin/blead
12231121
1224 # then "delete-and-push"
1122 # then "delete-and-push"
1225 $ git push origin :$user/$topic
1123 % git push origin :$user/$topic
1226 $ git push origin $user/$topic
1124 % git push origin $user/$topic
12271125
12281126=begin original
12291127
12301128B<NOTE:> it is forbidden at the repository level to delete any of the
12311129"primary" branches. That is any branch matching
12321130C<m!^(blead|maint|perl)!>. Any attempt to do so will result in git
12331131producing an error like this:
12341132
12351133=end original
12361134
12371135B<注意:> リポジトリレベルで"プライマリ"ブランチを削除することは
12381136禁止されています。
12391137これは C<m!^(blead maint perl)!> にマッチングするブランチです。
12401138削除しようとすると、gitは次のようなエラーを生成します:
12411139
1242 $ git push origin :blead
1140 % git push origin :blead
1243 *** It is forbidden to delete blead/maint branches in this repository
1141 *** It is forbidden to delete blead/maint branches in this repository
1244 error: hooks/update exited with error code 1
1142 error: hooks/update exited with error code 1
1245 error: hook declined to update refs/heads/blead
1143 error: hook declined to update refs/heads/blead
1246 To ssh://perl5.git.perl.org/perl
1144 To ssh://perl5.git.perl.org/perl
1247 ! [remote rejected] blead (hook declined)
1145 ! [remote rejected] blead (hook declined)
1248 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl'
1146 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl'
12491147
12501148=begin original
12511149
12521150As a matter of policy we do B<not> edit the history of the blead and
12531151maint-* branches. If a typo (or worse) sneaks into a commit to blead or
12541152maint-*, we'll fix it in another commit. The only types of updates
1255allowed on these branches are "fast-forward's", where all history is
1153allowed on these branches are "fast-forwards", where all history is
12561154preserved.
12571155
12581156=end original
12591157
12601158ポリシーとして、blead ブランチと maint-* ブランチの履歴は編集 B<しません>。
12611159タイプミス(またはそれ以上)が blead または maint-* へのコミットに
12621160忍び込んだ場合は、別のコミットで修正します。
12631161これらのブランチで許可されている更新のタイプは "fast-forward" だけで、
12641162すべての履歴が保存されます。
12651163
12661164=begin original
12671165
12681166Annotated tags in the canonical perl.git repository will never be
12691167deleted or modified. Think long and hard about whether you want to push
1270a local tag to perl.git before doing so. (Pushing unannotated tags is
1168a local tag to perl.git before doing so. (Pushing simple tags is
12711169not allowed.)
12721170
12731171=end original
12741172
12751173標準的な perl.git リポジトリ内の注釈付きタグは、削除や
12761174変更されることはありません。
12771175ローカルタグを perl.git にプッシュする前に、じっくり考えてみてください
1278(注釈なしタグのプッシュは許可されていません)。
1176(単純タグのプッシュは許可されていません)。
12791177
12801178=head2 Grafts
12811179
12821180(接ぎ木)
12831181
12841182=begin original
12851183
12861184The perl history contains one mistake which was not caught in the
12871185conversion: a merge was recorded in the history between blead and
12881186maint-5.10 where no merge actually occurred. Due to the nature of git,
12891187this is now impossible to fix in the public repository. You can remove
12901188this mis-merge locally by adding the following line to your
12911189C<.git/info/grafts> file:
12921190
12931191=end original
12941192
12951193Perl履歴には、変換で検出されなかった誤りが一つ含まれています:
12961194blead と maint-5.10 の間の履歴にマージが記録されましたが、
12971195実際にはマージは発生しませんでした。
12981196git の性質上、パブリックリポジトリで修正することは現在不可能です。
12991197C<.git/info/graft> ファイルに次の行を追加することで、
13001198この誤ったマージをローカルで削除できます。
13011199
1302 296f12bbbbaa06de9be9d09d3dcf8f4528898a49 434946e0cb7a32589ed92d18008aaa1d88515930
1200 296f12bbbbaa06de9be9d09d3dcf8f4528898a49 434946e0cb7a32589ed92d18008aaa1d88515930
13031201
13041202=begin original
13051203
13061204It is particularly important to have this graft line if any bisecting
13071205is done in the area of the "merge" in question.
13081206
13091207=end original
13101208
13111209問題の「マージ」領域で bisect が行われる場合、この graft 行を
13121210指定することが特に重要です。
13131211
13141212=head1 WRITE ACCESS TO THE GIT REPOSITORY
13151213
13161214(git リポジトリへの書き込みアクセス)
13171215
13181216=begin original
13191217
13201218Once you have write access, you will need to modify the URL for the
13211219origin remote to enable pushing. Edit F<.git/config> with the
13221220git-config(1) command:
13231221
13241222=end original
13251223
13261224一旦書き込み権限を得たら、
13271225プッシュを有効にするために origin remote のための URL を
13281226変更する必要があります。
13291227git-config(1) コマンドで F<.git/config> を次のように編集します:
13301228
1331 % git config remote.origin.url ssh://perl5.git.perl.org/perl.git
1229 % git config remote.origin.url git@github.com:Perl/perl5.git
13321230
13331231=begin original
13341232
13351233You can also set up your user name and e-mail address. Most people do
13361234this once globally in their F<~/.gitconfig> by doing something like:
13371235
13381236=end original
13391237
13401238ユーザー名と電子メールアドレスを設定することもできます。
13411239ほとんどの人は、以下のようにすることで F<~/.gitconfig> でグローバルに
13421240一度これを行います:
13431241
13441242 % git config --global user.name "Ævar Arnfjörð Bjarmason"
13451243 % git config --global user.email avarab@gmail.com
13461244
13471245=begin original
13481246
1349However, if you'd like to override that just for perl,
1247However, if you'd like to override that just for perl,
13501248execute something like the following in F<perl>:
13511249
13521250=end original
13531251
13541252しかし、perl だけに対してこれを変更したい場合は、
13551253F<perl> で次のようなものを実行します:
13561254
13571255 % git config user.email avar@cpan.org
13581256
13591257=begin original
13601258
13611259It is also possible to keep C<origin> as a git remote, and add a new
13621260remote for ssh access:
13631261
13641262=end original
13651263
13661264C<origin> を git remote として維持し、ssh アクセス用の新しい remote を
13671265追加することも可能です:
13681266
1369 % git remote add camel perl5.git.perl.org:/perl.git
1267 % git remote add camel git@github.com:Perl/perl5.git
13701268
13711269=begin original
13721270
13731271This allows you to update your local repository by pulling from
13741272C<origin>, which is faster and doesn't require you to authenticate, and
13751273to push your changes back with the C<camel> remote:
13761274
13771275=end original
13781276
13791277これにより、C<origin> からプルしてローカルリポジトリを更新できます;
13801278これはより高速で、認証を必要としません;
13811279また、C<camel> リモートで変更をプッシュバックすることもできます。
13821280
13831281 % git fetch camel
13841282 % git push camel
13851283
13861284=begin original
13871285
13881286The C<fetch> command just updates the C<camel> refs, as the objects
13891287themselves should have been fetched when pulling from C<origin>.
13901288
13911289=end original
13921290
13931291C<fetch> コマンドは単に C<camel> refs を更新するだけです;
13941292なぜなら、オブジェクト自体は C<origin> からプルするときに
13951293フェッチされるべきだからです。
13961294
13971295=head2 Accepting a patch
13981296
13991297(パッチを受け入れる)
14001298
14011299=begin original
14021300
14031301If you have received a patch file generated using the above section,
14041302you should try out the patch.
14051303
14061304=end original
14071305
14081306前述の節でを使って生成されたパッチファイルを受け取った場合は、
14091307パッチを試してみてください。
14101308
14111309=begin original
14121310
14131311First we need to create a temporary new branch for these changes and
14141312switch into it:
14151313
14161314=end original
14171315
14181316まず、これらの変更のための一時的な新しいブランチを作成し、そのブランチに
14191317切り替える必要があります:
14201318
1421 % git checkout -b experimental
1319 % git checkout -b experimental
14221320
14231321=begin original
14241322
14251323Patches that were formatted by C<git format-patch> are applied with
14261324C<git am>:
14271325
14281326=end original
14291327
14301328C<git format-patch> でフォーマットされたパッチは、C<git am> で適用されます:
14311329
1432 % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1330 % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1433 Applying Rename Leon Brocard to Orange Brocard
1331 Applying Rename Leon Brocard to Orange Brocard
14341332
14351333=begin original
14361334
1335Note that some UNIX mail systems can mess with text attachments containing
1336'From '. This will fix them up:
1337
1338=end original
1339
1340一部の UNIX メールシステムは、添付テキストに 'From ' が含まれていると
1341おかしくなるかもしれないことに注意してください。
1342これは次のようにして修正します:
1343
1344 % perl -pi -e's/^>From /From /' \
1345 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
1346
1347=begin original
1348
14371349If just a raw diff is provided, it is also possible use this two-step
14381350process:
14391351
14401352=end original
14411353
14421354生の diff だけが提供されている場合は、次の 2 段階のプロセスを
14431355使用することもできます:
14441356
1445 % git apply bugfix.diff
1357 % git apply bugfix.diff
1446 % git commit -a -m "Some fixing" --author="That Guy <that.guy@internets.com>"
1358 % git commit -a -m "Some fixing" \
1359 --author="That Guy <that.guy@internets.com>"
14471360
14481361=begin original
14491362
14501363Now we can inspect the change:
14511364
14521365=end original
14531366
14541367ここで変更を検査できます:
14551368
1456 % git show HEAD
1369 % git show HEAD
1457 commit b1b3dab48344cff6de4087efca3dbd63548ab5e2
1370 commit b1b3dab48344cff6de4087efca3dbd63548ab5e2
1458 Author: Leon Brocard <acme@astray.com>
1371 Author: Leon Brocard <acme@astray.com>
1459 Date: Fri Dec 19 17:02:59 2008 +0000
1372 Date: Fri Dec 19 17:02:59 2008 +0000
14601373
1461 Rename Leon Brocard to Orange Brocard
1374 Rename Leon Brocard to Orange Brocard
14621375
1463 diff --git a/AUTHORS b/AUTHORS
1376 diff --git a/AUTHORS b/AUTHORS
1464 index 293dd70..722c93e 100644
1377 index 293dd70..722c93e 100644
1465 --- a/AUTHORS
1378 --- a/AUTHORS
1466 +++ b/AUTHORS
1379 +++ b/AUTHORS
1467 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
1380 @@ -541,7 +541,7 @@ Lars Hecking <lhecking@nmrc.ucc.ie>
1468 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
1381 Laszlo Molnar <laszlo.molnar@eth.ericsson.se>
1469 Leif Huhn <leif@hale.dkstat.com>
1382 Leif Huhn <leif@hale.dkstat.com>
1470 Len Johnson <lenjay@ibm.net>
1383 Len Johnson <lenjay@ibm.net>
1471 -Leon Brocard <acme@astray.com>
1384 -Leon Brocard <acme@astray.com>
1472 +Orange Brocard <acme@astray.com>
1385 +Orange Brocard <acme@astray.com>
1473 Les Peters <lpeters@aol.net>
1386 Les Peters <lpeters@aol.net>
1474 Lesley Binks <lesley.binks@gmail.com>
1387 Lesley Binks <lesley.binks@gmail.com>
1475 Lincoln D. Stein <lstein@cshl.org>
1388 Lincoln D. Stein <lstein@cshl.org>
14761389
14771390=begin original
14781391
14791392If you are a committer to Perl and you think the patch is good, you can
14801393then merge it into blead then push it out to the main repository:
14811394
14821395=end original
14831396
14841397もしあなたが Perl のコミッタで、パッチが良いものだと思うなら、
14851398それを blead にマージしてメインのリポジトリにプッシュすることができます:
14861399
14871400 % git checkout blead
14881401 % git merge experimental
14891402 % git push origin blead
14901403
14911404=begin original
14921405
14931406If you want to delete your temporary branch, you may do so with:
14941407
14951408=end original
14961409
14971410一時的なブランチを削除したいなら、以下のようにできます:
14981411
1499 % git checkout blead
1412 % git checkout blead
1500 % git branch -d experimental
1413 % git branch -d experimental
1501 error: The branch 'experimental' is not an ancestor of your current HEAD.
1414 error: The branch 'experimental' is not an ancestor of your current
1502 If you are sure you want to delete it, run 'git branch -D experimental'.
1415 HEAD. If you are sure you want to delete it, run 'git branch -D
1503 % git branch -D experimental
1416 experimental'.
1504 Deleted branch experimental.
1417 % git branch -D experimental
1418 Deleted branch experimental.
15051419
15061420=head2 Committing to blead
15071421
15081422(blead にコミットする)
15091423
15101424=begin original
15111425
15121426The 'blead' branch will become the next production release of Perl.
15131427
15141428=end original
15151429
15161430'blead' ブランチは、Perl の次の正式版リリースになります。
15171431
15181432=begin original
15191433
15201434Before pushing I<any> local change to blead, it's incredibly important
15211435that you do a few things, lest other committers come after you with
15221436pitchforks and torches:
15231437
15241438=end original
15251439
15261440I<何らかの> ローカルな変更をプッシュする前に、
15271441あなたの後から来る他のコミッタが熊手と松明を持ってこないように、
15281442いくつかのことをするのが極めて重要です:
15291443
15301444=over
15311445
15321446=item *
15331447
15341448=begin original
15351449
15361450Make sure you have a good commit message. See L<perlhack/Commit
15371451message> for details.
15381452
15391453=end original
15401454
15411455よいコミットメッセージを書くようにしてください。
15421456詳しくは L<perlhack/Commit message> を参照してください。
15431457
15441458=item *
15451459
15461460=begin original
15471461
15481462Run the test suite. You might not think that one typo fix would break a
15491463test file. You'd be wrong. Here's an example of where not running the
15501464suite caused problems. A patch was submitted that added a couple of
1551tests to an existing .t. It couldn't possibly affect anything else, so
1465tests to an existing F<.t>. It couldn't possibly affect anything else, so
1552no need to test beyond the single affected .t, right? But, the
1466no need to test beyond the single affected F<.t>, right? But, the
15531467submitter's email address had changed since the last of their
15541468submissions, and this caused other tests to fail. Running the test
15551469target given in the next item would have caught this problem.
15561470
15571471=end original
15581472
15591473テストスイートを実行します。
15601474一つのタイプミス修正がテストファイルを壊すとは思わないかもしれません。
15611475それは間違いです。
15621476スイートを実行しないと問題が発生する例を次に示します。
1563既存の .t にいくつかのテストを追加するパッチが提出されました。
1477既存の F<.t> にいくつかのテストを追加するパッチが提出されました。
15641478他の何にも影響する可能性はないので、
1565影響を受けた一つ以上をテストする必要はありません。
1479影響を受けた一つの F<.t> 以上をテストする必要はありません。
15661480そうですね?
15671481しかし、送信者のメールアドレスが前回の送信時から変更されていて、
15681482このための他のテストが失敗するようになりました。
15691483次の項目のテストターゲットを実行すると、この問題を捕まえられます。
15701484
15711485=item *
15721486
15731487=begin original
15741488
15751489If you don't run the full test suite, at least C<make test_porting>.
15761490This will run basic sanity checks. To see which sanity checks, have a
15771491look in F<t/porting>.
15781492
15791493=end original
15801494
15811495完全なテストスイートを実行しない場合でも、
15821496最低 C<make test_porting> は実行してください。
15831497これは基本的な正気チェックを実行します。
15841498どの正気チェックかを見るには、F<t/porting> を見てください。
15851499
15861500=item *
15871501
15881502=begin original
15891503
15901504If you make any changes that affect miniperl or core routines that have
15911505different code paths for miniperl, be sure to run C<make minitest>.
15921506This will catch problems that even the full test suite will not catch
15931507because it runs a subset of tests under miniperl rather than perl.
15941508
15951509=end original
15961510
15971511miniperl や miniperl のための異なるコードパスを持つコアルーチンに
15981512影響する変更を行う場合、C<make minitest> をするようにしてください。
15991513これは、perl ではなく miniperl でテストの一部を行うために完全な
16001514テストスイートでは捕捉できない問題も捕捉します。
16011515
16021516=back
16031517
16041518=head2 On merging and rebasing
16051519
16061520(マージとリベース時)
16071521
16081522=begin original
16091523
16101524Simple, one-off commits pushed to the 'blead' branch should be simple
16111525commits that apply cleanly. In other words, you should make sure your
16121526work is committed against the current position of blead, so that you can
16131527push back to the master repository without merging.
16141528
16151529=end original
16161530
16171531'blead' ブランチにプッシュされた、単純な 1 回限りのコミットは、
16181532クリーンに適用される単純なコミットであるべきです。
16191533言い換えると、作業したものは blead の現在の位置に対して
16201534コミットすることで、マージすることなく master に
16211535プッシュできるようにするべきです。
16221536
16231537=begin original
16241538
16251539Sometimes, blead will move while you're building or testing your
16261540changes. When this happens, your push will be rejected with a message
16271541like this:
16281542
16291543=end original
16301544
16311545あなたが変更したものをビルドしたりテストしたりしている間に、
16321546時々 blead は動きます。
16331547これが起きると、プッシュは次のようなメッセージで拒否されます:
16341548
1635 To ssh://perl5.git.perl.org/perl.git
1549 To ssh://perl5.git.perl.org/perl.git
1636 ! [rejected] blead -> blead (non-fast-forward)
1550 ! [rejected] blead -> blead (non-fast-forward)
1637 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl.git'
1551 error: failed to push some refs to 'ssh://perl5.git.perl.org/perl.git'
1638 To prevent you from losing history, non-fast-forward updates were rejected
1552 To prevent you from losing history, non-fast-forward updates were
1639 Merge the remote changes (e.g. 'git pull') before pushing again. See the
1553 rejected Merge the remote changes (e.g. 'git pull') before pushing
1640 'Note about fast-forwards' section of 'git push --help' for details.
1554 again. See the 'Note about fast-forwards' section of 'git push --help'
1555 for details.
16411556
16421557=begin original
16431558
16441559When this happens, you can just I<rebase> your work against the new
16451560position of blead, like this (assuming your remote for the master
16461561repository is "p5p"):
16471562
16481563=end original
16491564
16501565これが起きた場合、次のようにして、blead の新しい位置に対してあなたの作業を
16511566単に I<リベース> します (master リポジトリに対するあなたのリモート名を
16521567"p5p" と仮定します):
16531568
1654 $ git fetch p5p
1569 % git fetch p5p
1655 $ git rebase p5p/blead
1570 % git rebase p5p/blead
16561571
16571572=begin original
16581573
16591574You will see your commits being re-applied, and you will then be able to
16601575push safely. More information about rebasing can be found in the
16611576documentation for the git-rebase(1) command.
16621577
16631578=end original
16641579
16651580コミットが再適用され、安全にプッシュできるようになります。
16661581リベースに関するさらなる情報は、git-rebase(1) コマンドの文書にあります。
16671582
16681583=begin original
16691584
16701585For larger sets of commits that only make sense together, or that would
16711586benefit from a summary of the set's purpose, you should use a merge
16721587commit. You should perform your work on a L<topic branch|/Topic
16731588branches and rewriting history>, which you should regularly rebase
16741589against blead to ensure that your code is not broken by blead moving.
16751590When you have finished your work, please perform a final rebase and
16761591test. Linear history is something that gets lost with every
16771592commit on blead, but a final rebase makes the history linear
16781593again, making it easier for future maintainers to see what has
16791594happened. Rebase as follows (assuming your work was on the
16801595branch C<< committer/somework >>):
16811596
16821597=end original
16831598
16841599一緒にすることでのみ意味がある、または集合の目的の要約としての
16851600価値があるような、より大きなコミットの集合に対しては、
16861601マージコミットを使うべきです。
16871602作業は L<トピックブランチ|/Topic
16881603branches and rewriting history> で行うべきです;
16891604そして、blead の移動によってあなたのコードが壊れていないことを
16901605確認するために定期的に blead に対してリベースするべきです。
16911606作業が終わったら、最後にリベースしてテストしてください。
16921607線形の履歴は blead にコミットされる度に失われますが、
16931608最後のリベースは再び履歴を線形にし、
16941609将来の保守者が何が起きたのかを見るのをより容易にします。
16951610次のようにしてリベースします (あなたの作業が
16961611C<< committer/somework >> ブランチにあると仮定します):
16971612
1698 $ git checkout committer/somework
1613 % git checkout committer/somework
1699 $ git rebase blead
1614 % git rebase blead
17001615
17011616=begin original
17021617
17031618Then you can merge it into master like this:
17041619
17051620=end original
17061621
17071622それから次のようにして master にマージできます:
17081623
1709 $ git checkout blead
1624 % git checkout blead
1710 $ git merge --no-ff --no-commit committer/somework
1625 % git merge --no-ff --no-commit committer/somework
1711 $ git commit -a
1626 % git commit -a
17121627
17131628=begin original
17141629
17151630The switches above deserve explanation. C<--no-ff> indicates that even
17161631if all your work can be applied linearly against blead, a merge commit
17171632should still be prepared. This ensures that all your work will be shown
17181633as a side branch, with all its commits merged into the mainstream blead
17191634by the merge commit.
17201635
17211636=end original
17221637
17231638前述のスイッチは説明が必要でしょう。
17241639C<--no-ff> は、たとえあなたの作業が blead に対して線形に適用可能でも、
17251640マージコミットが準備されることを示します。
17261641これによりあなたの作業は側道のブランチとして表示され、
17271642そのコミットはマージコミットによってメインの blead に
17281643マージされることになります。
17291644
17301645=begin original
17311646
17321647C<--no-commit> means that the merge commit will be I<prepared> but not
17331648I<committed>. The commit is then actually performed when you run the
17341649next command, which will bring up your editor to describe the commit.
17351650Without C<--no-commit>, the commit would be made with nearly no useful
17361651message, which would greatly diminish the value of the merge commit as a
17371652placeholder for the work's description.
17381653
17391654=end original
17401655
17411656C<--no-commit> は、マージコミットは I<準備> はされますが
17421657I<コミット> はされないことを意味します。
17431658コミットは実際には次のコマンドを実行して、
17441659コミットの説明のためにエディタが起動した後に実行されます。
17451660C<--no-commit> なしの場合、
17461661有用なメッセージなしでコミットが行われます;
17471662これは作業の説明のためのプレースホルダとしてマージコミットの価値を
17481663大幅に減らしてしまいます。
17491664
17501665=begin original
17511666
17521667When describing the merge commit, explain the purpose of the branch, and
17531668keep in mind that this description will probably be used by the
17541669eventual release engineer when reviewing the next perldelta document.
17551670
17561671=end original
17571672
17581673マージコミットの説明を書くとき、
17591674このブランチの目的を説明してください;
17601675そしてこの説明はおそらく次の perldelta 文書をレビューするときに
17611676最終的なリリースエンジニアによって使われるだろうということを
17621677心に留めておいてください。
17631678
17641679=head2 Committing to maintenance versions
17651680
17661681(メンテナンスバージョンにコミットする)
17671682
17681683=begin original
17691684
17701685Maintenance versions should only be altered to add critical bug fixes,
17711686see L<perlpolicy>.
17721687
17731688=end original
17741689
17751690メンテナンスバージョンは、重要なバグ修正を追加する場合にのみ変更してください;
17761691L<perlpolicy> を参照してください。
17771692
17781693=begin original
17791694
17801695To commit to a maintenance version of perl, you need to create a local
17811696tracking branch:
17821697
17831698=end original
17841699
17851700perl のメンテナンスバージョンにコミットするには、
17861701ローカル追跡ブランチを作成する必要があります。
17871702
17881703 % git checkout --track -b maint-5.005 origin/maint-5.005
17891704
17901705=begin original
17911706
17921707This creates a local branch named C<maint-5.005>, which tracks the
17931708remote branch C<origin/maint-5.005>. Then you can pull, commit, merge
17941709and push as before.
17951710
17961711=end original
17971712
17981713これにより、リモートブランチ C<origin/maint-5.005> を追跡する
17991714C<maint-5.005> という名前のローカルブランチが作成されます。
18001715次に、以前と同じようにプル、コミット、マージ、プッシュを行うことができます。
18011716
18021717=begin original
18031718
18041719You can also cherry-pick commits from blead and another branch, by
18051720using the C<git cherry-pick> command. It is recommended to use the
18061721B<-x> option to C<git cherry-pick> in order to record the SHA1 of the
18071722original commit in the new commit message.
18081723
18091724=end original
18101725
18111726C<git cherry-pick> コマンドを使用して、blead と別のブランチから
18121727コミットをチェリーピックすることもできます。
18131728元のコミットの SHA1 を新しいコミットメッセージに記録するために、
18141729C<git cherry-pick> に B<-x> オプションを使うことを勧めます。
18151730
18161731=begin original
18171732
18181733Before pushing any change to a maint version, make sure you've
18191734satisfied the steps in L</Committing to blead> above.
18201735
18211736=end original
18221737
18231738maint 版に何かをプッシュする前に、前述の
18241739L</Committing to blead> のステップを満たしていることを確認してください。
18251740
1826=head2 Merging from a branch via GitHub
1827
1828(GitHub 経由のブランチをマージする)
1829
1830=begin original
1831
1832While we don't encourage the submission of patches via GitHub, that
1833will still happen. Here is a guide to merging patches from a GitHub
1834repository.
1835
1836=end original
1837
1838私たちはパッチを GitHub 経由で投稿することを勧めていませんが、
1839実際発生します。
1840これは GitHub リポジトリからのパッチをマージするためのガイドです。
1841
1842 % git remote add avar git://github.com/avar/perl.git
1843 % git fetch avar
1844
1845=begin original
1846
1847Now you can see the differences between the branch and blead:
1848
1849=end original
1850
1851これで、そのブランチと blead の差分を見られるようになりました:
1852
1853 % git diff avar/orange
1854
1855=begin original
1856
1857And you can see the commits:
1858
1859=end original
1860
1861そしてコミットを表示できます:
1862
1863 % git log avar/orange
1864
1865=begin original
1866
1867If you approve of a specific commit, you can cherry pick it:
1868
1869=end original
1870
1871特定のコミットを承認する場合は、次のようにして選択できます:
1872
1873 % git cherry-pick 0c24b290ae02b2ab3304f51d5e11e85eb3659eae
1874
1875=begin original
1876
1877Or you could just merge the whole branch if you like it all:
1878
1879=end original
1880
1881または、必要に応じてブランチ全体をマージすることもできます:
1882
1883 % git merge avar/orange
1884
1885=begin original
1886
1887And then push back to the repository:
1888
1889=end original
1890
1891そして、リポジトリにプッシュバックします:
1892
1893 % git push origin blead
1894
1895
18961741=head2 Using a smoke-me branch to test changes
18971742
18981743(変更をテストするために smoke-me ブランチを使う)
18991744
19001745=begin original
19011746
19021747Sometimes a change affects code paths which you cannot test on the OSes
19031748which are directly available to you and it would be wise to have users
19041749on other OSes test the change before you commit it to blead.
19051750
19061751=end original
19071752
19081753時々、ある変更があなたが直接利用できない OS に関するテストできない
19091754コードパスに影響することがあるので、
19101755blead にコミットする前に他の OS のユーザーが変更をテストしてもらうのが
19111756賢明です。
19121757
19131758=begin original
19141759
19151760Fortunately, there is a way to get your change smoke-tested on various
19161761OSes: push it to a "smoke-me" branch and wait for certain automated
19171762smoke-testers to report the results from their OSes.
1763A "smoke-me" branch is identified by the branch name: specifically, as
1764seen on github.com it must be a local branch whose first name
1765component is precisely C<smoke-me>.
19181766
19191767=end original
19201768
19211769幸い、様々な OS であなたの変更をスモークテストする方法があります:
19221770これを "smoke-me" ブランチとしてプッシュして、いくつかの自動
19231771smoke-testers が彼らの OS からの結果を報告するのを待ちます。
1772"smoke-me" ブランチはブランチ名によって識別されます:
1773特に、github.com で見られるように、名前の最初の部分が正確に
1774C<smoke-me> であるローカルブランチでなければなりません。
19241775
19251776=begin original
19261777
19271778The procedure for doing this is roughly as follows (using the example of
1928of tonyc's smoke-me branch called win32stat):
1779tonyc's smoke-me branch called win32stat):
19291780
19301781=end original
19311782
19321783これをするための手順は大まかに次のようなものです
19331784(tonyc による win32stat と呼ばれる smoke-me ブランチの例を使います):
19341785
19351786=begin original
19361787
19371788First, make a local branch and switch to it:
19381789
19391790=end original
19401791
19411792まず、ローカルブランチを作ってそれに切り替えます:
19421793
19431794 % git checkout -b win32stat
19441795
19451796=begin original
19461797
19471798Make some changes, build perl and test your changes, then commit them to
19481799your local branch. Then push your local branch to a remote smoke-me
19491800branch:
19501801
19511802=end original
19521803
19531804変更を行い、perl をビルドして変更をテストし、ローカルブランチに
19541805コミットします。
19551806それからローカルブランチをリモートの smoke-me ブランチにプッシュします:
19561807
19571808 % git push origin win32stat:smoke-me/tonyc/win32stat
19581809
19591810=begin original
19601811
19611812Now you can switch back to blead locally:
19621813
19631814=end original
19641815
19651816ここでローカルの blead に戻します:
19661817
19671818 % git checkout blead
19681819
19691820=begin original
19701821
19711822and continue working on other things while you wait a day or two,
19721823keeping an eye on the results reported for your smoke-me branch at
19731824L<http://perl.develop-help.com/?b=smoke-me/tonyc/win32state>.
19741825
19751826=end original
19761827
19771828そして他の作業をして数日待ち、smoke-me ブランチに対する報告される結果
19781829L<http://perl.develop-help.com/?b=smoke-me/tonyc/win32state> を注視します。
19791830
19801831=begin original
19811832
19821833If all is well then update your blead branch:
19831834
19841835=end original
19851836
19861837全てがうまくいっていれば、手元の blead ブランチを更新します:
19871838
19881839 % git pull
19891840
19901841=begin original
19911842
19921843then checkout your smoke-me branch once more and rebase it on blead:
19931844
19941845=end original
19951846
19961847それからもう一度手元の smoke-me ブランチをチェックアウトして、
19971848それを blead にリベースします:
19981849
19991850 % git rebase blead win32stat
20001851
20011852=begin original
20021853
20031854Now switch back to blead and merge your smoke-me branch into it:
20041855
20051856=end original
20061857
20071858ここで blead に戻して、smoke-me ブランチをマージします:
20081859
20091860 % git checkout blead
20101861 % git merge win32stat
20111862
20121863=begin original
20131864
20141865As described earlier, if there are many changes on your smoke-me branch
20151866then you should prepare a merge commit in which to give an overview of
20161867those changes by using the following command instead of the last
20171868command above:
20181869
20191870=end original
20201871
20211872前述したように、smoke-me ブランチに多くの変更がある場合は、
20221873前述の最後のコマンドの代わりに次のコマンドを使うことで、
20231874これらの変更の概要を記録するためのマージコミットを準備するべきです:
20241875
20251876 % git merge win32stat --no-ff --no-commit
20261877
20271878=begin original
20281879
20291880You should now build perl and test your (merged) changes one last time
20301881(ideally run the whole test suite, but failing that at least run the
20311882F<t/porting/*.t> tests) before pushing your changes as usual:
20321883
20331884=end original
20341885
20351886ここで perl をビルドして、いつものように変更をプッシュする前に、
20361887あなたの(マージされた)変更を最後にもう一度テストするべきです
20371888(理想的には、テストスイート全体を実行します; しかし、
20381889少なくとも F<t/porting/*.t> テストを実行します) 。
20391890
20401891 % git push origin blead
20411892
20421893=begin original
20431894
20441895Finally, you should then delete the remote smoke-me branch:
20451896
20461897=end original
20471898
20481899最後に、リモートの smoke-me ブランチを削除して:
20491900
20501901 % git push origin :smoke-me/tonyc/win32stat
20511902
20521903=begin original
20531904
20541905(which is likely to produce a warning like this, which can be ignored:
20551906
20561907=end original
20571908
20581909(これはおそらく次のような警告を出しますが、無視できます:
20591910
2060 remote: fatal: ambiguous argument 'refs/heads/smoke-me/tonyc/win32stat':
1911 remote: fatal: ambiguous argument
2061 unknown revision or path not in the working tree.
1912 'refs/heads/smoke-me/tonyc/win32stat':
2062 remote: Use '--' to separate paths from revisions
1913 unknown revision or path not in the working tree.
1914 remote: Use '--' to separate paths from revisions
20631915
20641916=begin original
20651917
20661918) and then delete your local branch:
20671919
20681920=end original
20691921
20701922) そしてローカルブランチを削除します:
20711923
20721924 % git branch -d win32stat
2073
2074=head2 A note on camel and dromedary
2075
2076(camel と dromedary に関する注意)
2077
2078=begin original
2079
2080The committers have SSH access to the two servers that serve
2081C<perl5.git.perl.org>. One is C<perl5.git.perl.org> itself (I<camel>),
2082which is the 'master' repository. The second one is
2083C<users.perl5.git.perl.org> (I<dromedary>), which can be used for
2084general testing and development. Dromedary syncs the git tree from
2085camel every few minutes, you should not push there. Both machines also
2086have a full CPAN mirror in /srv/CPAN, please use this. To share files
2087with the general public, dromedary serves your ~/public_html/ as
2088C<http://users.perl5.git.perl.org/~yourlogin/>
2089
2090=end original
2091
2092コミッタは、C<perl5.git.perl.org> にサービスを提供する二つの
2093サーバにアクセスできます。
2094C<perl5.git.perl.org> 自身 (I<camel>) で、
2095これが「マスター」リポジトリです。
2096二つ目は C<users.perl5.git.perl.org> (I<dromedary>) で、
2097一般的なテストと開発に使用できます。
2098dromedary は数分ごとに camel から git ツリーを同期するので、そこに
2099プッシュしてはいけません。
2100両方のマシンには /srv/CPAN に完全な CPAN ミラーもあるので、
2101これを使ってください。
2102dromedary はファイルを一般公開するために、
2103~/public_html/ を C<http://users.perl5.git.perl.org/~yourlogin/> として
2104提供しています。
2105
2106=begin original
2107
2108These hosts have fairly strict firewalls to the outside. Outgoing, only
2109rsync, ssh and git are allowed. For http and ftp, you can use
2110http://webproxy:3128 as proxy. Incoming, the firewall tries to detect
2111attacks and blocks IP addresses with suspicious activity. This
2112sometimes (but very rarely) has false positives and you might get
2113blocked. The quickest way to get unblocked is to notify the admins.
2114
2115=end original
2116
2117これらのホストは、外部に対してかなり厳格なファイアウォールを持っています。
2118送信は rsync、ssh、git だけが許可されています。
2119http と ftp に対しては、プロキシとして http://webproxy:3128 を使用できます。
2120受信は、ファイアウォールは攻撃を検出し、疑わしいアクティビティを持つ
2121IP アドレスをブロックしようとします。
2122これは時に(非常にまれに)誤検出があり、ブロックされる可能性があります。
2123ブロックを解除する最も簡単な方法は、管理者に通知することです。
2124
2125=begin original
2126
2127These two boxes are owned, hosted, and operated by booking.com. You can
2128reach the sysadmins in #p5p on irc.perl.org or via mail to
2129C<perl5-porters@perl.org>.
2130
2131=end original
2132
2133これら二つのボックスは、booking.com によって所有され、ホストされ、
2134運営されています。
2135システム管理者には、irc.perl.org の #p5p か、
2136C<perl5-porters@perl.org> へのメールで連絡できます。
21371925
21381926=begin meta
21391927
21401928Translate: SHIRAKATA Kentaro <argrath@ub32.org>
21411929Status: completed
21421930
21431931=end meta