git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pack.packSizeLimit and --max-pack-size not working?
@ 2008-11-12 15:12 Jon Nelson
  2008-11-12 16:17 ` [PATCH] fix pack.packSizeLimit and --max-pack-size handling Nicolas Pitre
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Nelson @ 2008-11-12 15:12 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-12 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 15:12 pack.packSizeLimit and --max-pack-size not working? Jon Nelson
2008-11-12 16:17 ` [PATCH] fix pack.packSizeLimit and --max-pack-size handling Nicolas Pitre
2008-11-12 17:46   ` Junio C Hamano
2008-11-12 18:23     ` Nicolas Pitre
2008-11-12 21:23       ` Junio C Hamano
2008-11-12 17:58   ` Jon Nelson
2008-11-12 21:42   ` Nanako Shiraishi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).