Thread (19 messages) flat view 19 messages, 7 authors, 2016-06-15

Re: Why repository grows after "git gc"? / Purpose of *.keep files?

From: Teemu Likonen <hidden>
Date: 2016-06-15 22:44:36

Johannes Schindelin wrote (2008-05-12 18:13 +0100):
On Mon, 12 May 2008, Teemu Likonen wrote:
quoted
Probably a crazy idea: What if "gc --aggressive" first removed
*.keep files and after packing and garbage-collecting and whatever
it does it would add a .keep file for the newly created pack?
Most .keep files are not meant to be removed by git-gc.  Usually,
.keep files are only created interactively (if you _want_ to keep
a pack, e.g. when it has been optimally packed and is big), or by
git-index-pack while it is writing a pack (IIRC).

So I think it would be wrong for "gc --aggressive" to remove the .keep
files.
I guess you're right. Maybe "gc --aggressive" could delete only certain
machine-generated .keep files which have an identifier inside?

Well, I don't really have any problems with the current behaviour; it
just feels a bit strange that, for example, Linus's kernel repository
grew about 90MB after just one update pull and gc. Also, dangling
objects are kept forever in .keep packs (which are created with "git
clone", for example).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help