git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git gc and kernel.org

From
Nicolas Pitre <nico@fluxnic.net>
Date
Oct 20, 2009, 21:16 UTC
Message-ID
<alpine.LFD.2.00.0910201706430.21460@xanadu.home>
In-Reply-To
<7v63a9n5i6.fsf@alter.siamese.dyndns.org>
On Tue, 20 Oct 2009, Junio C Hamano wrote:
Show 9 quoted lines
> Nicolas Pitre <nico@fluxnic.net> 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.

Show 10 quoted lines
> @@ -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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 18 in “git gc and kernel.org”
  1. H. Peter AnvinOct 20, 2009
  2. Junio C HamanoOct 20, 2009
  3. H. Peter AnvinOct 20, 2009
  4. Johan HerlandOct 20, 2009
  5. Nicolas PitreOct 20, 2009
  6. Junio C HamanoOct 20, 2009
  7. Nicolas PitreOct 20, 2009
  8. receive-pack: run "gc --auto" and optionally "update-server-info"Junio C Hamano, Oct 20, 2009
  9. Nicolas PitreOct 21, 2009
  10. Johannes SixtOct 21, 2009
  11. Junio C HamanoOct 21, 2009
  12. Junio C HamanoOct 21, 2009
  13. Johannes SixtOct 21, 2009
  14. Jan KrügerOct 21, 2009
  15. 1/2 gc --auto --quiet: make the notice a bit less verboaseJunio C Hamano, Oct 21, 2009
  16. 2/2 receive-pack: run "gc --auto --quiet " and optionally "update-server-info"Junio C Hamano, Oct 21, 2009
  17. Mikael MagnussonOct 20, 2009
  18. H. Peter AnvinOct 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.