Converting between svn revisions and git commit id's in git svn repos

Jonathan Leto jaleto at gmail.com
Wed May 5 09:23:10 UTC 2010


Howdy,

I feel that this is a sufficiently important bit of information that
it deserves to be a new thread, instead of being buried deeply in a
semi-related thread.

>From the "git svn find-rev" man page at [0]

    When given an SVN revision number of the form rN, returns the
corresponding git commit hash (this can optionally be followed by a
tree-ish to specify which branch should be searched). When given a
tree-ish, returns the corresponding SVN revision number.

A tree-ish is very similar to a commit-ish:

<tree-ish>: Indicates a tree, commit or tag object name. A command
that takes a <tree-ish> argument ultimately wants to operate on a
<tree> object but automatically dereferences <commit> and <tag>
objects that point at a <tree>.

<commit-ish>: Indicates a commit or tag object name. A command that
takes a <commit-ish> argument ultimately wants to operate on a
<commit> object but automatically dereferences <tag> objects that
point at a <commit>.

In normal words, a tree-ish is something includes a commit and all the
symbolic ways to represent a commit, such and branch names, tags,
etc.. The git community book has a nice page about it [1]. You can get
more definitions of the basic terms that git people use in the main
git man page [2].

Duke


[0] - http://kernel.org/pub/software/scm/git/docs/git-svn.html
[1] - http://book.git-scm.com/4_git_treeishes.html
[2] - http://linux.die.net/man/7/git

-- 
Jonathan "Duke" Leto
jonathan at leto.net
http://leto.net


More information about the parrot-dev mailing list