triptico.com

Un naufragio personal

Matching git-svn strange authors to useful email addresses

Git-svn is a useful tool to communicate with a Subversion repository from git. You usually clone a repository with a command like:

 git-svn clone svn+ssh://angel@svn.example.com/path/to/prj/trunk prj

And a prj directory is created with a full git repository. Then, you get another people changes with git-svn rebase and commit yours with git-svn dcommit.

It has one drawback, though; authors are mangled to something like

 Author: angel <angel@2e99d34b-3c1d-0410-9ca7-923d03b5684e>

which is not only ugly but completely useless.

To map this monstrosity to real user email addresses and names, use the following steps:

First, create the file ~/.gitusers with content like this:

 angel = Ángel Ortega <angel@triptico.com>
 otheruser = Other User <ouser@example.net>

If you converted your SVN repository from CVS with something like cvs2svn you'll also find entries like this:

 Author: (no author) <(no author)@2e99d34b-3c1d-0410-9ca7-923d03b5684e>

Those ones can be converted with another line in ~/.gitusers.

 (no author) = Really Me <email@example.org>

And now, instead of the usual git-svn clone command, use the following ones:

 mkdir prj
 cd prj
 git-svn init svn+ssh://angel@svn.example.com/path/to/prj/trunk
 git config svn.authorsfile ~/.gitusers
 git-svn fetch

Visitor comments

pinushKasusia
2011-04-03
hello world

Angel Ortega
2011-04-03
The world salutes you back

Brian Koontz
2011-12-25
Thanks for the hint on handling (no author)!

Sidney
2014-01-02
I needed to write down a brief notice in buy to thanks for all the fantastic suggestions you're placing at triptico.com. My prolonged internet lookup has at the finish of the day been recognized with reliable details and techniques to trade with my co-workers. I would assert that several of us readers really are seriously lucky to live in a important location with quite several excellent individuals with insightful pointers. wish you all the best in 2014!

Ming
2014-01-03
You will have to consider aspect inside an important challenge for one from all of the most beneficial blog sites for all of the net. I actually can suggest triptico.com ! wish you luck in New Year!

Marta
2014-01-04
Hahah, My laptop crashed when I was browsing triptico.com last time I was here. And for the past 2 months I have been looking for this weblog, so thankful I located it once again! :D wish you luck in New Year!

Georgetta
2014-01-05
I greatly appreciate every one of the informative read on triptico.com. I most certainly will spread the phrase about your site with people. Cheers. wish you luck in New Year!