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

Re: git gc and kernel.org

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 21, 2009, 08:05 UTC
Message-ID
<4ADEC0DB.4000104@viscovery.net>
In-Reply-To
<7vaazl8acd.fsf@alter.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 20 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
>> Johannes Sixt <j.sixt@viscovery.net> writes:
>>
>>> Junio C Hamano schrieb:
>>>> +		if (auto_gc) {
>>>> +			const char *argv_gc_auto[] = { "gc", "--auto", NULL };
>>>> +			run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
>>> Am I correct that this will produce progress output? If git-daemon runs
>>> receive-pack, then this output will go to the syslog. Do we care?
>> We do, and we don't want that.  Thanks for spotting.
>>
>> Would adding "--quiet" to the mix be enough?
> 
> Actually I don't know.  This originally came from "we _could_ add gc and
> update-server-info to hundreds of post-receive hooks, but any repository
> hosting site that holds many central repositories will exactly have the
> same issue, so why not do this internally", so it may make sense to do
> exactly the same thing as what we do to the output from hooks.  What do we
> do to them now?  stdout-to-stderr?
Yes.

I'm slightly in favor of adding "--quiet", because even with this option we see some output:

$ git gc --auto --quiet Auto packing your repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information.

A compromise would be to reduce this message to the first sentence if --quiet was given. This way users who push via ssh or locally get a short explanation why "git push" does not finish immediately[*]; and git-daemon logs only a one-liner in the syslog, which might be useful, too.

[*] Skipping the hint to "run git gc manually" would even be good in this case, because the hint pertains the remote repository, not the one from which "git push" was issued.

-- Hannes
Previous: Junio C HamanoNext: Jan Krüger
Message 13 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.