From: Nicolas Pitre Date: Tue, 20 Oct 2009 21:16:34 GMT Subject: Re: git gc and kernel.org Message-ID: In-Reply-To: <7v63a9n5i6.fsf@alter.siamese.dyndns.org> On Tue, 20 Oct 2009, Junio C Hamano wrote: > Nicolas Pitre writes: > > > Still... Hopefully this is going to become redundant information in the > > future with the eventual deployment of smart protocol over HTTP. So I > > think that as a config option being off by default this is a good > > compromize. Site administrators can turn it on by default in > > /etc/gitconfig. > > Ok, something like this? Looks fine to me, except... > +receive.autogc:: > + If set to true, git-receive-pack will run "git-gc --auto" > + after receiving data from git-push and updating refs. While I was arguing for automatic git-update-server-info to be off by default, I however think that this one might be worth turning on by default. Most of the time I expect people simply don't log into the server where they push stuff and the kernel.org episode certainly shows this as being a worthwhile thing to do, and contrary to update-server-info this is likely to always be so even in the future. > @@ -672,6 +684,12 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) > report(unpack_status); > run_receive_hook(post_receive_hook); > run_update_post_hook(commands); > + if (auto_update_server_info) > + update_server_info(0); > + if (auto_gc) { > + const char *argv_gc_auto[] = { "gc", "--auto", NULL }; > + run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); > + } If git-update-server-info is listing packs, shouldn't it be run after git-gc and not before? Nicolas