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

pack.packSizeLimit and --max-pack-size not working?

From
JNJon Nelson <jnelson@jamponi.net>
Date
Nov 12, 2008, 15:12 UTC
Message-ID
<cccedfc60811120712o7fcbf648l9f4b8e6f52e50e39@mail.gmail.com>

I'm using 1.6.0.4 and I've found some weird behavior with pack.packSizeLimit and/or --max-pack-size.

Initially, I thought I could just use pack.packSizeLimit and set it to (say) 1 to try to limit the size of individual packfiles to 1MiB or less. That does not appear to be working.

In one case I performed the following set of commands:

# set pack.packSizeLimit to 20 git config --global pack.packSizeLimit 20

# verify that it's 20 git config --get pack.packSizeLimit # verify it's 20

# run gc --prune git gc --prune

# show the packfiles # I find a *single* 65MB packfile, not a series # of 20MB (or less) packfiles. ls -la .git/objects/pack/*.pack

# try repack -ad git repack -ad

# I find a *single* 65MB packfile, not a series # of 20MB (or less) packfiles. ls -la .git/objects/pack/*.pack

So it would appear that the pack.packSizeLimit param is just being ignored??

Then I tested using --max-pack-size explicitly. This works, to a degree.
git repack -ad --max-pack-size 20

# the following shows *4* pack files none larger # than (about) 20MB ls -la .git/objects/pack/*.pack

# try again with 3MB. This also works. git repack -ad --max-pack-size 3 find .git/objects/pack -name '*.pack' -size +3M -ls # nothing

# try again with 1MB. This does NOT work. git repack -ad --max-pack-size 1

# here, I find a *single* 65MB pack file again: find .git/objects/pack -name '*.pack' -size +1M -ls

Am I doing something completely wrong with pack.packSizeLimit? What is going on with --max-pack-size in the 1MB case?

-- 
Jon
Next: Nicolas Pitre
Message 1 of 7 in “pack.packSizeLimit and --max-pack-size not working?”
  1. Jon NelsonNov 12, 2008
  2. fix pack.packSizeLimit and --max-pack-size handlingNicolas Pitre, Nov 12, 2008
  3. Junio C HamanoNov 12, 2008
  4. fix pack.packSizeLimit and --max-pack-size handlingNicolas Pitre, Nov 12, 2008
  5. Junio C HamanoNov 12, 2008
  6. Nanako ShiraishiNov 12, 2008
  7. Jon NelsonNov 12, 2008

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.