threads / discuss / 20153

git svn .git/svn/*/index files taking up huge amounts of disk space

Subject: git svn .git/svn/*/index files taking up huge amounts of disk space

## tl;dr

2 messages between Jul 18, 2009 and Jul 18, 2009.

replies: 1people: 2as markdown or json

Robert Zeh· Jul 18, 2009, 14:58 UTC · lore

I have recently imported a Subversion repository with 1.6.4.rc0.17.gd9eb0, and ran into an interesting tidbit. The .git/svn directory is the largest directory, taking up about twice as much space as the .git/objects directory.

Most of the space is taken up by index files under .git/svn under .git/ svn/tag or .git/svn/<branch name> directories in the subversion tree.

The repository uses the normal Subversion layout (trunk/tags/branches) and was setup with git svn init -s. There are a lot of tags in the repository - about one per day for the past several years.

What are the index files under .git/svn used for? Am I doing anything wrong? Can the index files under .git/svn be safely removed? My brief look at git-svn.perl makes me think that they are temporary, but I'm not sure.

Thanks, Robert

Peter Harris· Jul 18, 2009, 18:10 UTC · re: Robert Zeh · lore

Re: git svn .git/svn/*/index files taking up huge amounts of disk space

On Sat, Jul 18, 2009 at 10:58 AM, Robert Zeh wrote:
> What are the index files under .git/svn used for?  Am I doing anything
> wrong?  Can the index files under .git/svn be safely removed?  My brief look
> at git-svn.perl makes me think that they are temporary, but I'm not sure.

The index files are used to keep track of the commits that came from svn, so that git-svn rebase knows where to start from (either when committing or when doing a fetch from svn).

Unless you used the --no-metadata switch, the files under .git/svn can be safely removed (at the cost of performance when operating a branch that has had its index removed).

Peter Harris

← back to recent threads