git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-fast-import yields huge packfile

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 16, 2019, 21:04 UTC
Message-ID
<CAADWXX81agAg1B9+FM5c4JsWzANKochNTcv2ShsRzAsZpHAVWw@mail.gmail.com>
In-Reply-To
<CALwJ=MzrqPUNw=jc0NRtaJaJG+ErXNb577JNSN66GiGY4UFtRw@mail.gmail.com>
On Sat, Mar 16, 2019 at 1:31 PM Richard Hipp <drh@sqlite.org> wrote:
>
> Maybe I'm doing something wrong with the fast-import stream that is
> defeating Git's attempts at delta compression....

fast-import doesn't do fancy delta compression becayse that would defeat the "fast" part of fast-import.

Just do a git repack after the import to do the proper repacking. I get a 41Mb packfile when I try that on your repo.

So a simple
   git repack -adf

should fix things up for you (the "-f" to make sure it doesn't try to re-use things from the silly bad pack). Alternatively, use "git gc --aggressive", which will do that forced repack too.

                  Linus
Previous: Richard HippNext: Mike Hommey
Message 2 of 6 in “git-fast-import yields huge packfile”
  1. Richard HippMar 16, 2019
  2. Linus TorvaldsMar 16, 2019
  3. Mike HommeyMar 16, 2019
  4. Richard HippMar 16, 2019
  5. Johannes SchindelinMar 21, 2019
  6. Ævar Arnfjörð BjarmasonMar 21, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.