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

Re: Mirror repositories for submodules

From
Simon Richter <simon.richter@hogyros.de>
Date
Jun 4, 2026, 09:27 UTC
Message-ID
<fa075b7a-96f6-4fd9-ae94-30ddf323f759@hogyros.de>
In-Reply-To
<20260604061605.GA3194609@coredump.intra.peff.net>
Hi,
On 6/4/26 3:16 PM, Jeff King wrote:
> Here's a thought experiment. What if you put the UUID into a URL, like:
>    repoid://123456789.git
Yes, that's the idea, except I would want to use a relative URL, like
     ../123456789.git

This could solve the "naive cloning" problem, because it creates an expectation that the submodules can be found on the same server, or in a nearby path.

I'm aware that this is *also* bad for decentralization, because it makes it easier to use one of the big forges where the repositories for often-used submodules are are already likely to be present, but it plays into our use case, where we want to share the repositories for often-used subprojects.

> Now, all of that said, do we still need uuids at all? If the canonical
> submodule name is https://github.com/git/git.git, then anybody can just
> rewrite that locally in the same way using url.*.insteadOf config.

Yes, but we'd then need a mechanism for a server to indicate "for cloning, you should use these 'insteadOf' settings, which is a massive can of worms from a security standpoint.

I also don't think these canonical URLs can ever be stable if they refer to infrastructure that is not under the control of the maintainer -- it would tie the project identity to the hosting provider, and increase the inertia to overcome for moves (such as the current exodus from github and gitlab towards codeberg).

> Which makes me wonder if I am missing something about the original
> request that started this thread. But it sounds to me like it is just
> asking for the existing URL-rewriting feature.

The original mail has a similar problem as we do in Debian, and as my employer has: CI jobs should exclusively talk to in-house infrastructure, because continuously cloning repositories for each build is bad for the environment.

The common goal is that a naive clone should get submodules from a local server, ideally without us having to write some tool to make an initial checkout, enumerate submodules, create insteadOf settings, clone first layer of submodules, enumerate second layer, ...

    Simon
Previous: Jeff KingNext: Jeff King
Message 5 of 13 in “Mirror repositories for submodules”
  1. Benson MuiteJun 1, 2026
  2. Junio C HamanoJun 4, 2026
  3. Simon RichterJun 4, 2026
  4. Jeff KingJun 4, 2026
  5. Simon RichterJun 4, 2026
  6. Jeff KingJun 8, 2026
  7. Benson MuiteJun 5, 2026
  8. Benson MuiteJun 5, 2026
  9. Matt HunterJun 5, 2026
  10. Benson MuiteJun 5, 2026
  11. Simon RichterJun 5, 2026
  12. Benson MuiteJun 5, 2026
  13. Benson MuiteJun 5, 2026

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.