cosmin / git-hg

A git-hg utility for checking out and tracking a mercurial repo.
http://offbytwo.github.com/git-hg
MIT License
307 stars 51 forks source link

stores objects twice, wasting disk space #62

Open infinity0 opened 7 years ago

infinity0 commented 7 years ago

git-hg stores the same objects under both .git/objects and .git/hgremote/objects, wasting space by 2x. A workaround is to share objects:

$ du -sh
2.1G    .
$ echo ../hgremote/objects/ >> .git/objects/info/alternates
$ git repack -a -d -l
$ git gc --prune=all
$ du -sh
1.1G    .