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

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

From
FSFrank Sorenson <frank@tuxrocks.com>
Date
Aug 29, 2005, 07:41 UTC
Message-ID
<4312BC27.9010604@tuxrocks.com>
In-Reply-To
<7vbr3hlqjs.fsf@assigned-by-dhcp.cox.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Junio C Hamano wrote:
Show 13 quoted lines
> Frank Sorenson <frank@tuxrocks.com> 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 <frank@tuxrocks.com>
> 
> 
> 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?
Show 5 quoted lines
> 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
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDErwnaI0dwg4A47wRAkVGAKDqDjQ5IBTO+DC/nKpYl+69w7RESgCg6omQ xwbQqnXJnfxITC1TAjRtLSk= =tCyP -----END PGP SIGNATURE-----

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “git-repack-script: Add option to repack all objects”
  1. git-repack-script: Add option to repack all objectsFrank Sorenson, Aug 27, 2005
  2. Junio C HamanoAug 28, 2005
  3. Frank SorensonAug 29, 2005
  4. Junio C HamanoAug 29, 2005
  5. git-repack-script: Add option to repack all objects.Junio C Hamano, Aug 29, 2005
  6. A Large Angry SCMAug 29, 2005
  7. Junio C HamanoAug 29, 2005
  8. A Large Angry SCMAug 29, 2005
  9. Junio C HamanoAug 29, 2005
  10. Frank SorensonAug 29, 2005

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.