git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Thomas Glanzmann <thomas@glanzmann.de>, GIT <git@vger.kernel.org>
Subject: Re: git-fast-export hg mutt (24M vs 184M)
Date: Thu, 3 May 2007 17:18:24 -0400	[thread overview]
Message-ID: <20070503211824.GB16538@spearce.org> (raw)
In-Reply-To: <20070503210112.GE3260@artemis>

Pierre Habouzit <madcoder@debian.org> wrote:
> On Thu, May 03, 2007 at 09:17:16PM +0200, Thomas Glanzmann wrote:
> > Hello,
> > git-repack -a -d -f got it down to 19M. I missed the -f parameter
> > before. Sorry for the noise.
> 
>   You may want to use git gc that does that (and a bit more) for you.

Actually, in this case, no.

git-gc by default doesn't use the -f option.  -f to git-repack
means "no reuse deltas".  That particular feature of git-repack is
basically required to be used after running git-fast-import with
anything sizeable.

The reason you need -f is git-fast-import does not write optimally
compressed blobs (file revisions) when it creates the packfile.
Instead it does a reasonable best effort while using a minimum
amount of memory.  The Git packfiles get most of their compression
benefits from being able to see all of a project's data at once;
this is impossible in fast-import as we're only seeing a small part
of the incoming data stream at any single point in time.

If you had a lot of tags imported you might want to also use `git
pack-refs` (one of the chores that git-gc does), or `git pack-refs
--all` if you have a lot of dangling branches imported.  The other
chores in git-gc aren't actually useful after running fast-import
(reflog expire, prune, rerere gc).

-- 
Shawn.

  reply	other threads:[~2007-05-03 21:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-03 18:56 git-fast-export hg mutt (24M vs 184M) Thomas Glanzmann
2007-05-03 19:17 ` Thomas Glanzmann
2007-05-03 21:01   ` Pierre Habouzit
2007-05-03 21:18     ` Shawn O. Pearce [this message]
2007-05-03 22:29       ` Pierre Habouzit
2007-05-04  1:11         ` Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070503211824.GB16538@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=madcoder@debian.org \
    --cc=thomas@glanzmann.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).