Jeff King <peff@xxxxxxxx> writes: > The pre-auto-gc hook runs only when we need to gc (i.e., when we would > be doing something expensive, anyway). So it is still cheap to check > whether we need to gc (although if you have an option like "--check" > which does not _fix_ the situation after checking, then you may end up > running the hook repeatedly). Whether we need to gc might be cheap to check, but I think the worry about the new hook added after commit lost auto-gc was the hook to see if the user declines our offer to run "gc --auto" may be expensive with an extra fork and exec. But I am personally fine with "commit" running "gc --auto" every time; pre-auto-gc hook is opt-in after all. As you mentioned in your own follow-up message, however, it will make things worse without any real benefit if it is merely "check and warn but never gc". Also when "gc --auto" does not make the repository better (I vaguely recall some corner cases mentioned here in the past), repeated invocation of it might make such a change annoying. -- 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