Git checkouts from the KDE SVN repository are expensive
Tagged:  •  

In Ariya's previous entry about Git and SVN I commented that a checkout takes a considerable amount of disk space. For example, checking out the rsibreak source from KDE SVN with git-svn resulted in a directory of 73 megabytes (!).

In the .git folder, there is a hidden file in svn/git-svn/.rev_db.xxx . Interesting is the fact that the file contains 793995 lines. That looks like a revision number, at the time I checked out the RSIBreak source. Every line contains a git like revision number, and 99.9% of the lines are just

0000000000000000000000000000000000000000

because not all revisions belong to the rsibreak folder I checked out.

I wonder why these lines are necessary, they really eat a lot of disk space. And now we have to find out if there's something that can be done about it. A git-svn checkout from the KDE repository is too expensive to my taste.

Shouldn't be a problem in later versions of Git

Which version of Git are you using?

As of v1.5.4, things should be better. From the 1.5.4. release notes:

* "git svn" wasted way too much disk to record revision mappings between svn and git; a new representation that is much more compact for this information has been introduced to correct this.

Finally, you only need these files at all if you plan to interact with the SVN repo through "git svn". If you're doing a one-time conversion instead, you can delete the whole .git/svn folder.

According to http://marc.info/?l=git&m=120734745806416 you can also do a custom repack to further improve the space usage of your git repos.

Git is improving fairly rapidly, so I always advise people to run the most recent version possible (1.5.5 as of this writing).

Git-svn

Also, git is not git-svn. While Git itself is already very mature (ok, some commands could need better (as in user-readable) documentation), git-svn is just beginning to work.

Beside such space-wasting things git-svn sometimes didn't work for me. Since updating to 1.5.4 95% of the issues are fixed, now on 1.5.5 so far I didn't run into any problems. With 1.5.3 I had really a lot of issues.

OK, it could be that I'm

OK, it could be that I'm still with 1.5.3.7, the latest stable release offered by Gentoo. I should be a bit more patient then. Actually it's the only issue I have with this version of Git.

clean it up, run git-gc. I'm

clean it up, run git-gc. I'm sure that'll shave of a few M.

Well, you can use a reiser4

Well, you can use a reiser4 fs with compression enabeld.