pack.packSizeLimit and --max-pack-size not working?
- From
- Jon 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