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

Re: Large repo and pack.packsizelimit

From
Junio C Hamano <gitster@pobox.com>
Date
May 9, 2012, 17:30 UTC
Message-ID
<7vlil1tg7w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<loom.20120509T131228-943@post.gmane.org>
Thomas <th.acker66@arcor.de> writes:
> (1) all objects to be transferred to another repo 
> (2) all loose objects when starting a local repack
> Case (1) can be fixed by transfer.unpacklimit but there is no fix for (2).

Technically (1) is putting everything in a single pack to transfer, and it is only the receiving end that does the chopping.

For (2), you could do something like
	keep=$( git rev-list --objects $some_rev |
	        git pack-objects --delta-base-offset pack ) &&
	mv pack-$keep.pack pack-$keep.idx .git/objects/pack/ &&
	echo "keep $some_rev" >.git/objects/pack/pack-$keep.keep

after finding a suitable $some_rev that is old enough so that it will be an ancestor of anything that matters in the future and gives small enough packfiles. You may want to try doing the above multiple times, by picking a few strategic ranges, e.g.

	for some_rev in v1.0 v1.0..v2.0 v2.0..v2.4 v2.4..v3.0
	do
		... the above four lines come here ...
	done

The objects stored in .keep packs won't participate in future repack so your "git repack -a -d" after that will put everything that is needed only for versions newer than v3.0 in a single new pack.

Previous: ThomasNext: Thomas
Message 9 of 10 in “Large repo and pack.packsizelimit”
  1. th.acker66@arcor.deMay 3, 2012
  2. Jeff KingMay 8, 2012
  3. Nicolas PitreMay 8, 2012
  4. Jeff KingMay 8, 2012
  5. Nicolas PitreMay 8, 2012
  6. ThomasMay 9, 2012
  7. Nguyen Thai Ngoc DuyMay 9, 2012
  8. ThomasMay 9, 2012
  9. Junio C HamanoMay 9, 2012
  10. ThomasMay 10, 2012

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.