{"thread":{"id":"7958","subject":"Re: git-fast-export hg mutt (24M vs 184M)","startedAt":"2007-05-03T18:56:24Z","lastAt":"2007-05-04T01:11:22Z","messageCount":6,"participants":["Thomas Glanzmann","Pierre Habouzit","Shawn O. Pearce","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40972","messageId":"20070503185623.GA11817@cip.informatik.uni-erlangen.de","threadId":"7958","inReplyTo":null,"subject":"git-fast-export hg mutt (24M vs 184M)","fromName":"Thomas Glanzmann","fromEmail":"thomas@glanzmann.de","sentAt":"2007-05-03T18:56:24Z","receivedAt":"2007-05-03T18:56:24Z","isPatch":false,"sender":{"key":"thomas@glanzmann.de","avatar":null},"body":"Hello,\nI just tried to vendor track / import the mutt hg repository into git.\ngit-fast-export-hg is quiet amazing but the resulting git repository\nblows up in size and I have not the slightes clue why.\n\n        git clone git://repo.or.cz/fast-export.git\n        hg clone http://dev.mutt.org/hg/mutt\n\nCould someone have a look at this? I used Debian Etch with a git version\nI build myself using an ugly script. I had to upgrade mecurial as well\nbecause the version didn't had the cmdlog.py. I used the unstable debian\npackage for that.\n\n        (thinkpad) [~/work/mutt] git-init-db\n        Initialized empty Git repository in .git/\n        (thinkpad) [~/work/mutt] ~/work/fast-export/hg-fast-export.sh -r /tmp/mutt\n\ngit version 1.5.2.rc0.56.g6169a\n\n        Thomas\n"},{"id":"40971","messageId":"20070503191716.GB11817@cip.informatik.uni-erlangen.de","threadId":"7958","inReplyTo":"20070503185623.GA11817@cip.informatik.uni-erlangen.de","subject":"Re: git-fast-export hg mutt (24M vs 184M)","fromName":"Thomas Glanzmann","fromEmail":"thomas@glanzmann.de","sentAt":"2007-05-03T19:17:16Z","receivedAt":"2007-05-03T19:17:16Z","isPatch":false,"sender":{"key":"thomas@glanzmann.de","avatar":null},"body":"Hello,\ngit-repack -a -d -f got it down to 19M. I missed the -f parameter\nbefore. Sorry for the noise.\n\n        Thomas\n"},{"id":"40982","messageId":"20070503210112.GE3260@artemis","threadId":"7958","inReplyTo":"20070503191716.GB11817@cip.informatik.uni-erlangen.de","subject":"Re: git-fast-export hg mutt (24M vs 184M)","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-05-03T21:01:12Z","receivedAt":"2007-05-03T21:01:12Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Thu, May 03, 2007 at 09:17:16PM +0200, Thomas Glanzmann wrote:\n> Hello,\n> git-repack -a -d -f got it down to 19M. I missed the -f parameter\n> before. Sorry for the noise.\n\n  You may want to use git gc that does that (and a bit more) for you.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"40983","messageId":"20070503211824.GB16538@spearce.org","threadId":"7958","inReplyTo":"20070503210112.GE3260@artemis","subject":"Re: git-fast-export hg mutt (24M vs 184M)","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-05-03T21:18:24Z","receivedAt":"2007-05-03T21:18:24Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Pierre Habouzit <madcoder@debian.org> wrote:\n> On Thu, May 03, 2007 at 09:17:16PM +0200, Thomas Glanzmann wrote:\n> > Hello,\n> > git-repack -a -d -f got it down to 19M. I missed the -f parameter\n> > before. Sorry for the noise.\n> \n>   You may want to use git gc that does that (and a bit more) for you.\n\nActually, in this case, no.\n\ngit-gc by default doesn't use the -f option.  -f to git-repack\nmeans \"no reuse deltas\".  That particular feature of git-repack is\nbasically required to be used after running git-fast-import with\nanything sizeable.\n\nThe reason you need -f is git-fast-import does not write optimally\ncompressed blobs (file revisions) when it creates the packfile.\nInstead it does a reasonable best effort while using a minimum\namount of memory.  The Git packfiles get most of their compression\nbenefits from being able to see all of a project's data at once;\nthis is impossible in fast-import as we're only seeing a small part\nof the incoming data stream at any single point in time.\n\nIf you had a lot of tags imported you might want to also use `git\npack-refs` (one of the chores that git-gc does), or `git pack-refs\n--all` if you have a lot of dangling branches imported.  The other\nchores in git-gc aren't actually useful after running fast-import\n(reflog expire, prune, rerere gc).\n\n-- \nShawn.\n"},{"id":"40986","messageId":"20070503222946.GH3260@artemis","threadId":"7958","inReplyTo":"20070503211824.GB16538@spearce.org","subject":"Re: git-fast-export hg mutt (24M vs 184M)","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-05-03T22:29:46Z","receivedAt":"2007-05-03T22:29:46Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Thu, May 03, 2007 at 05:18:24PM -0400, Shawn O. Pearce wrote:\n> Pierre Habouzit <madcoder@debian.org> wrote:\n> > On Thu, May 03, 2007 at 09:17:16PM +0200, Thomas Glanzmann wrote:\n> > > Hello,\n> > > git-repack -a -d -f got it down to 19M. I missed the -f parameter\n> > > before. Sorry for the noise.\n> > \n> >   You may want to use git gc that does that (and a bit more) for you.\n> \n> Actually, in this case, no.\n> \n> git-gc by default doesn't use the -f option.  -f to git-repack\n> means \"no reuse deltas\".  That particular feature of git-repack is\n> basically required to be used after running git-fast-import with\n> anything sizeable.\n\n  okay, so why git fast-import does not let some note somewhere (to be\npicked by git gc later) \"a fast-import has been run, use -f for next\nrepack if you want best compression\" ?\n\n  I'd think that would make a lot of sense, and that users that now\nnaively (like me) think git-gc would always be enough would not be\ndramatically wrong ? :)\n\n  I mean it's nothing *very* important but some \n  `touch $GIT_DIR/info/unpacked-fast-import` in fast-import then:\n  if test -f $GIT_DIR/info/unpacked-fast-import; then\n      REPACK_OPTIONS=$REPACK_OPTIONS\\ -f\n  fi\n  // do the repack\n  rm -f $GIT_DIR/info/unpacked-fast-import\n\n  would do the trick, wouldn't it ?\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"41002","messageId":"alpine.LFD.0.99.0705032109070.24220@xanadu.home","threadId":"7958","inReplyTo":"20070503222946.GH3260@artemis","subject":"Re: git-fast-export hg mutt (24M vs 184M)","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-05-04T01:11:22Z","receivedAt":"2007-05-04T01:11:22Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 4 May 2007, Pierre Habouzit wrote:\n\n> On Thu, May 03, 2007 at 05:18:24PM -0400, Shawn O. Pearce wrote:\n> > Pierre Habouzit <madcoder@debian.org> wrote:\n> > > On Thu, May 03, 2007 at 09:17:16PM +0200, Thomas Glanzmann wrote:\n> > > > Hello,\n> > > > git-repack -a -d -f got it down to 19M. I missed the -f parameter\n> > > > before. Sorry for the noise.\n> > > \n> > >   You may want to use git gc that does that (and a bit more) for you.\n> > \n> > Actually, in this case, no.\n> > \n> > git-gc by default doesn't use the -f option.  -f to git-repack\n> > means \"no reuse deltas\".  That particular feature of git-repack is\n> > basically required to be used after running git-fast-import with\n> > anything sizeable.\n> \n>   okay, so why git fast-import does not let some note somewhere (to be\n> picked by git gc later) \"a fast-import has been run, use -f for next\n> repack if you want best compression\" ?\n\nNah.\n\nThe conversion script should do it itself directly after it is done with \nfast-import.\n\n\nNicolas\n"}]}