V
30  

del.icio.us icon Bookmark this page

Edit the sidebar

Tags
Attachments
Perl 5 Wiki
Perl Git Repositories

Getting Perl Source Code via Git

$ git clone git://perl5.git.perl.org/perl.git

A repository browser is available at http://perl5.git.perl.org/

The switch from Perforce to git has been completed.

See the Move To Git Todo List for the transition details. Also see Git Nitpicking for details and issues there were with the conversion of the repository to git. See Old Git Repositories for instructions on how to convert older "preview" repositories to the final release.

Git is not Perforce

Working with the Perl source with git will be a little different than it used to be in Perforce. At the level of basic commands, see Git for Perforce Users. See the GitWiki for more documentation and links to guides. Git in a Nutshell is a particularly good introduction to git.

Referencing specific commits

In Perforce, repository-wide revision numbers were used to reference specific states of the Perl source tree. Since git does not have monotonic revisions numbers, other approaches are necessary. There are two recommended options:

  • commit checksum
  • git describe

Commit checksum

The commit checksum is a SHA1 hash. Any substring of the checksum that is unique to a repository may be used as a shorthand. For example git log c0b3c may be used in place of git log c0b3c91c80e220d0acb83c795b6d73f4d7954e55

git describe

(taken from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-10/msg00094.html)

% git describe
v5.11.0-1234-g6603799

The first chunk is the most recent tag on the current branch (creating the tags will have to be part of the release process), the middle piece is the number of changes since that tag, and the last piece is an abbreviated hash referring to the most recent change. So you'll have a familiar version number and a handful of digits telling you where you are in relation to that version. This is arguably more human readable that the Perforce change number.

Something that may take getting used to is that there is no repository-wide change level, so v5.10.0-123 is a different and unrelated change to v5.11.0-123. So we'll have to get used to referring to changes since a particular version on a particular branch.

Finding historical Perforce revisions

Branches and tags

(someone please elaborate on the main heads and tags)

Submitting patches

(someone please explain the best way to do this)

Seeing a blame log

(Adapted from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-10/msg00132.html)

Start from here: http://perl5.git.perl.org/

Click on the "tree" link in the perl.git project row.

Locate av.c in the list. The output is in case sensitive alphabetical order (all the upper case names first) so av.c is hiding about halfway down.

Click on the "blame" link. Or click on the "history" link if instead of blame you want the equivalent of perlbrowse's "Show File Log" or "raw" if you want the equivalent of "Show Plain File."

But say you want to this for a particular branch, e.g., you only want the blame log for av.c for changes that have been integrated into the 5.8.x branch. Start in the same place: http://perl5.git.perl.org/

Click on the "summary" link in the perl.git project row.

Scroll down to the "heads" section at the bottom of the page.

Click on the "tree" link in the maint-5.8 row.

Locate av.c and click on "blame" or whatever.


 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: