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

Re: RFC: [PATCH] Support incremental pack files

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 26, 2007, 22:03 UTC
Message-ID
<Pine.LNX.4.63.0702262258120.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20070226214552.GA13402@auto.tuwien.ac.at>
Hi,
On Mon, 26 Feb 2007, Martin Koegler wrote:
Show 30 quoted lines
> On Fri, Feb 23, 2007 at 12:10:35AM -0800, Junio C Hamano wrote:
>
> >   $ P=.git/objects/pack
> >   $ git rev-list --objects v1.5.0 |
> >     git pack-objects --delta-base-offset \
> >           --depth=30 --window=100 --no-reuse-delta pack
> >   ...
> >   6fba5cb8ed92dfef71ff47def9f95fa1e703ba59
> >   $ mv pack-6fba5cb8ed92dfef71ff47def9f95fa1e703ba59.* $P/
> >   $ echo 'Post 1.5.0' >$P/pack-6fba5cb8ed92dfef71ff47def9f95fa1e703ba59.keep
> >   $ git gc --prune
> > 
> > This does three things:
> > 
> >  - It packs everything reachable from v1.5.0 with delta chain
> >    that is deeper than the default.
> > 
> >  - The pack is installed in the object store; the presence of
> >    .keep file (the contents of it does not matter) tells
> >    subsequent repack not to touch it.
> > 
> >  - Then the remaining objects are packed into different pack.
> > 
> > With this, the repository uses two packs, one is what I'll keep
> > until it's time to do the big repack again, another is what's
> > constantly recreated by repacking but contains only "recent"
> > object.
> 
> This could be a practical solution for me. The biggest disadvantage of 
> this solution is, that each pack file is at least >= 60 MB.

Junio has a branch he rewinds sometimes. That's why he does not do the obvious, which should work for you:

$ git gc --prune
$ for p in .git/objects/pack/*.pack; do
	keepfile=`echo $p | sed s/pack$/keep/`
	echo "Keep all current packs as-are" > $keepfile
  done

You should run this from time to time. You can run "git gc --prune" more often, of course...

Hth, Dscho

Previous: Martin KoeglerNext: Nicolas Pitre
Message 4 of 6 in “RFC: [PATCH] Support incremental pack files”
  1. Martin KoeglerFeb 23, 2007
  2. Junio C HamanoFeb 23, 2007
  3. Martin KoeglerFeb 26, 2007
  4. Johannes SchindelinFeb 26, 2007
  5. Nicolas PitreFeb 23, 2007
  6. Shawn O. PearceFeb 23, 2007

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.