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

Re: git gc and kernel.org

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2009, 07:48 UTC
Message-ID
<7veioyqzeo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4ADD6026.8070203@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
Show 22 quoted lines
> We have run into two major problems with git on kernel.org.  We have
> discussed workarounds, but I believe they are generally major problems
> which will affect other sites, and really need to be fixed upstream.
>
> 1) git receive-pack doesn't run git gc --auto.
>
> This cause repositories which people thought were being autopacked to
> not be so.  This can be done via a hook, but that is way too painful
> for people to do -- in fact, it's hard enough just to get people to
> enable the post-update hook for http fetching.
>
> 1b) as per the above, a way to make "git update-server-info" at
> post-update time a configurable option rather than needing to be done
> via the hook would be very nice, since a configuration option can be
> enabled sitewide.
>
> 2) When pushing to a repository, it apparently doesn't honor new
> objects in alternate repositories.  This causes massive unnecessary
> duplication.
>
> I believe these are major issues that need to be addressed.  If we are
> *mistaken* on these, then we would appreciate being corrected.

I actually was wondering if (2) is still true after reading the message from Wilcox. It should be a simple matter of testing, but I think this issue was improved around the end of January this year with v1.6.1.2.

As to (1), I think it is reasonable to do some sort of "gc" in receive-pack, and while I recall that Linus was violently against the idea, I personally think it is reasonable to run update-server-info ourselves at the same time without needing the hook, even if the repository is never going to be served over dumb http [*1*]. At one point, update-server-info used to compute a lot more than what we currently compute and it made some sense to oppose against it on performance ground.

But these days it only lists the refs and packs and does nothing else; the performance impact should be immeasurable and it adds only two files to the repository. It cannot be a big deal, unless you oppose to http transport on a non-technical ground.

Previous: H. Peter AnvinNext: H. Peter Anvin
Message 2 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.