Fun with Git

Published Tuesday January 30th, 2007
1 Comment on Fun with Git
Posted in Uncategorized

Just for the fun of it I wrote a 132 LOC python script that takes the output of a perforce client and produces input for git-fast-import. I just wanted to see how git would perform on a big repository like Qt’s. Git is a decentralized revision control system (check out the Wikipedia page for more information). I have to say I quite like the results πŸ™‚

I decided to import //depot/qt/main/…, which is the entire mainline of Qt, excluding branches but of course including all changes in the branches integrated into the mainline (which basically all). That’s about 94000 changes. The import took around 3 hours and resulted in a total of 736774 git objects.

The really cool thing is that git compressed this entire lot of data, 13 years of history, down to 500 Megabytes! Just to put this into relation: An entire checkout of the Qt mainline right now takes up 330 Mb.

This might turn out to be useful when working off-line during traveling, without a fast network connection. I can surely spare the 500MB on my harddisk, and I get the /entire/ Qt history with it. Needless to say that commits and other operations remain instantly fast.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Uncategorized

One comment

Tibi says:

Nice. How about staying in python land and extending your script to import it into a mercurial “repository”? I would like to see how it compares to git.
http://www.selenic.com/mercurial/wiki/

Commenting closed.

Get started today with Qt Download now