Subject: Re: [PATCH] git-repack-script: Add option to repack all objects

From: Frank Sorenson <[email-masked]>
Date: Mon, 29 Aug 2005 01:41:27 -0600

Junio C Hamano wrote:
> Frank Sorenson <[email-masked]> writes:
> 
>>This patch adds an option to git-repack-script to repack all objects,
>>including both packed and unpacked.  This allows a full repack of
>>a git archive (current cogito packs from 39MB to 4.5MB, and git packs
>>from 4.4MB to 3.8MB).
>>
>>Signed-off-by: Frank Sorenson <[email-masked]>
> 
> 
> While I agree that giving more flexibility to repack objects is
> a good idea, I am not sure rolling all existing objects into one
> pack and removing the existing one is a good way to go.

It reduces the disk space requirement significantly (linux packs from
135MB to 73MB), and I'm seeing speed improvements as well (probably
because cache-cold operation requires far less seeking, and the caching
requirements are smaller).

What are the benefits to keeping old packs?

> I'd do this slightly differently.  I do not think removing
> existing pack belongs to this command.  We would probably want a
> separate tool to find extra/redundant packs and remove them, or
> more generally optimize packs by selectively exploding them and
> repacking them ("pack optimizer").

I disagree about not removing old packs.  When you "repack" your
suitcase, you take everything out and put it back in again, so a command
named "repack" should remove all existing objects, and put them back again.

Okay, so the pack algorithm could be better, but that only means that
repacking the entire set of objects would improve things more, making
some sort of "git-repack-all" an even more valuable operation.

Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
[email-masked]