On Wed, Apr 22, 2009 at 02:45:29PM -0500, Brandon Casey wrote: > > Yes, it's a bit more work for you, but having "git gc" optimize by > > default for git's performance seems to be the only sensible course. > > Your idea of what is "big enough" above is somewhat outside the realm of > > git, so you have to pay the price to specify it by tweaking the > > keep-files. > > But isn't git-gc supposed to be the "high-level" command that just does > the right thing? It doesn't seem to me to be outside the scope of this > command to make a decision about trading off speed/io for optimal repo > layout. In fact, it does do this already. The default window, depth and > compression settings are chosen to be "good enough", not to produce the > absolute optimum repo. > > I'm just pointing out that everything is a trade off. So I think saying > something like "gc must optimize for git's performance" is not entirely > accurate. We make tradeoffs now. Other tradeoffs may be helpful. Sure, but my point was that git doesn't even know _how_ to make that tradeoff. It doesn't know what you consider a reasonable size of backup for your incremental backups, how often you might want to rollover your keep files, how often you expect to commit and how big the commits will be, etc. So it does the most reasonable thing, which is to optimize for git itself based on what it does know. If there is any improvement to be made, it is probably to make a simpler way for the user to specify that external knowledge to git (because tweaking .keep files really is unnecessarily complex for Matthieu's scenario). And maybe that is just adding a config variable analagous to "gc.autopacklimit" to be used for regular gc, but that would default to 0 (i.e., default to the current behavior of always repacking). But I don't think it makes sense to change the default. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html