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

Re: Should object repacking only update server-info for packs instead of doing it for refs?

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 15, 2024, 12:14 UTC
Message-ID
<Zw5cvnkBQ1MzIS79@pks.im>
In-Reply-To
<428B24FB-A648-43BA-9381-1B46D99E2F37@gmail.com>
On Tue, Oct 15, 2024 at 12:52:12PM +0100, Luca Milanesio wrote:
Show 31 quoted lines
> 
> 
> > On 15 Oct 2024, at 12:02, Patrick Steinhardt <ps@pks.im> wrote:
> > 
> > On Mon, Oct 14, 2024 at 05:25:42PM -0400, Taylor Blau wrote:
> >> On Mon, Oct 14, 2024 at 09:33:17PM +0100, Luca Milanesio wrote:
> >>>> It seems counterintuitive that an operation designed to repack
> >>>> objects would be performing maintenance of any sort on refs?
> >>> 
> >>> True, it should not touch info/refs IMHO, as you’re really not
> >>> changing any refs.
> >> 
> >> Right. I don't think that the current behavior is a bug, but just that
> >> it's doing unnecessary work from within 'git repack' to update the
> >> info/refs file when it's known ahead of time that the refs haven't
> >> changed.
> >> 
> >> I think it's reasonable to skip this step when repacking, but of course
> >> we would still want to update info/packs (assuming that the repack
> >> wasn't a noop, of course).
> > 
> > It certainly may be reasonable. But in my opinion, it would be even more
> > reasonable to not use the dumb HTTP transport at all. If you don't there
> > is no reason to run git-update-server-info(1) in the first place, so
> > you'd neither generate info/refs nor info/packs.
> 
> I don’t believe anyone uses it anymore, but someone *may* still use
> it, and therefore, Git should update the info/packs during geometric
> repacking. However, why not introduce a “kill switch” in git config to
> disable it so that all tools can automatically skip the expensive
> info/packs (and info/refs) updates?

We already have those, see "repack.updateServerInfo" and "receive.updateServerInfo". Not quite a single kill switch, but it is possible :)

Patrick
Previous: Luca MilanesioNext: Taylor Blau
Message 6 of 7 in “Should object repacking only update server-info for packs instead of doing it for refs?”
  1. Martin FickOct 14, 2024
  2. Luca MilanesioOct 14, 2024
  3. Taylor BlauOct 14, 2024
  4. Patrick SteinhardtOct 15, 2024
  5. Luca MilanesioOct 15, 2024
  6. Patrick SteinhardtOct 15, 2024
  7. Taylor BlauOct 15, 2024

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.