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

Disk waste with packs and .keep files

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 10, 2014, 08:21 UTC
Message-ID
<vpqmwdljhu8.fsf@anie.imag.fr>
Hi,

To minimize useless on-disk changes, I have a script that periodically creates .keep files for pack files greater than 10 Mb (so than tools like unison and incremental backup remain efficient). From time to time, I delete these .keep files and "git gc" each repo. This worked well for years.

Since a few weeks however, Git started wasting my disk space: instead of creating small .pack files next to the big .keep-ed pack files, it seems to create redundant, big .pack files (i.e. I get N pack files of similar size). "git verify-pack" confirms that, for example, the object corresponding to the root commit is contained in each of the .pack file.

I don't have a reproducible way to get the situation so I didn't bisect, but "git log --grep .keep" points me to this which seems related:

  commit ee34a2beadb94a9595f09af719e3c09b485ca797
  Author: Jeff King <peff@peff.net>
  Date:   Mon Mar 3 15:04:20 2014 -0500
    repack: add `repack.packKeptObjects` config var
Now, my questions:

Is the behavior I observed actually the intended behavior? Should Git be fixed, or should I fix my flow (I guess, stop using .keep files and start using pack.packSizeLimit or so)?

Or is my message not clear enough and do I need to investigate a bit more?

Thanks,
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Next: Jeff King
Message 1 of 13 in “Disk waste with packs and .keep files”
  1. Matthieu MoyJun 10, 2014
  2. Jeff KingJun 10, 2014
  3. Jeff KingJun 10, 2014
  4. 0/6 fix repack.packKeptObjects regression in v2.0Jeff King, Jun 10, 2014
  5. 1/6 repack: do not accidentally pack kept objects by defaultJeff King, Jun 10, 2014
  6. Jeff KingJun 11, 2014
  7. 2/6 repack: respect pack.writebitmapsJeff King, Jun 10, 2014
  8. 3/6 repack: s/write_bitmap/&s/ in codeJeff King, Jun 10, 2014
  9. 4/6 pack-objects: stop respecting pack.writebitmapsJeff King, Jun 10, 2014
  10. Junio C HamanoJun 10, 2014
  11. Jeff KingJun 10, 2014
  12. 5/6 repack: simplify handling of --write-bitmap-indexJeff King, Jun 10, 2014
  13. 6/6 repack: introduce repack.writeBitmaps config optionJeff King, Jun 10, 2014

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.