jmtd → log → exploring git repositories
I am in the process of moving the Doom packages that the Debian Games Team maintain from subversion to git.
I started with a small native package called game-data-packager
. The clone
operation took hours to run and resulted in a 90-odd Mb git repository. Since
game-data-packager
is a relatively small collection of shell scripts with a
recent history, I have reason to believe that git svn
has imported much more
of the Games Team SVN repo than just the game-data-packager
bits.
After fiddling with git repack -a -d
, git prune
and git gc --aggressive
,
the repository is still 80Mb large. How do I determine what is using all this
space? Can anyone advise me on the best way to analyse a repository like this?
Comments
Rémi:
Have You tried to git clone you new git repository ? If I remember correctly git svn store some information for the git/svn synchronisation that are not needed anymore if you choose to drop the svn repository.
If git svn is the same as regular git, i.e. operating on entire repositories, not subtrees, the following excerpt may help you. It clones a repository, then strips it down to a subtree, then clones it twice(!) to actually get it to remove the superfluous data.
-- mirabilos
Thank you for your comment! I think git filter-branch might be part of the solution, thanks for sharing your script. -- Jon
Hi Rémi, thanks for your comment. I did try that and the clone is indeed smaller, but if I've created local branches pointing at any of the branches I want, it's still 80+MB. Unfortunately the log for these branches shows lots of irrelevant commits. This must be a git-svn bug. -- Jon