Re: git gc and kernel.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Oct 2009, Junio C Hamano wrote:

> Nicolas Pitre <nico@xxxxxxxxxxx> 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
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]