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

git keeps recreating packs, exploding backup increments

From
Pierre Ossman <ossman@cendio.se>
Date
Feb 19, 2025, 09:38 UTC
Message-ID
<1524b9a5-6f8b-4537-ba6b-bdfdd4b1bdcb@cendio.se>
Hi,

I'm trying to understand git's repacking behaviour, as the observed behaviour doesn't match how I read the documentation or the code.

The problem we see is excessive backup increments for developer directories. The cause is that pack files keep getting regenerated for large repositories.

Users are not running 'git gc' manually, so the assumption is that this is caused by 'git gc --auto' being run implicitly.

 From what I can see in the code, and the documentation, it should only 
pack up objects not already found in existing packs. Or at the very 
least, not the objects found in the largest existing pack.
(at least not until gc.autoPackLimit is hit)

But this isn't happening. Old packs are constantly being replaced by new ones. Despite most of the objects being old and stable.

We tried gc.bigPackThreshold in the hope it would force it to reuse packs better. But all we got instead was duplication. It still creates new packs with everything. It just stopped removing the old ones.

Some guidance would be appreciated. I cannot find anything in the code or documentation that explains the current behaviour.

Regads,
-- 
Pierre Ossman           Software Development
Cendio AB               https://cendio.com
Teknikringen 8          https://twitter.com/ThinLinc
583 30 Linköping        https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Next: Han Young
Message 1 of 6 in “git keeps recreating packs, exploding backup increments”
  1. Pierre OssmanFeb 19, 2025
  2. Han YoungFeb 20, 2025
  3. Pierre OssmanFeb 20, 2025
  4. Patrick SteinhardtFeb 21, 2025
  5. Pierre OssmanFeb 24, 2025
  6. Pierre OssmanMay 9, 2025

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.