Why repository grows after "git gc"? / Purpose of *.keep files?
- From
- Teemu Likonen <tlikonen@iki.fi>
- Date
- May 12, 2008, 12:29 UTC
- Message-ID
- <20080512122900.GA13050@mithlond.arda.local>
I have noticed that after cloning a repository (via git protocol) the repo is packed pretty tightly and takes relatively small amount of disk space. After using it a while and running "git gc" the repo sometimes grows 25% or something like that.
For testing purposes I deleted objects/pack/*.keep file(s) and ran "git gc" again. The repo resulted in small again, just like after the initial clone. I don't have disk space problems but a repo growing about 25% after manual "git gc" seems weird. What's the purpose of these *.keep files? They just contain text like "fetch-pack <number> on <my hostname>".
PS. I have merged Brandon Casey's new git-gc/repack patches. In case it
has some effect. See the "pu" branch or "git log 9e7d5019".