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

url.<base>.insteadOf vs. submodules

From
Toolforger <toolforger@durchholz.org>
Date
Feb 19, 2017, 21:12 UTC
Message-ID
<84fcb0bd-85dc-0142-dd58-47a04eaa7c2b@durchholz.org>
Hi all,

I am trying to make url.<base>.insteadOf work on the URLs inside .gitmodules, but it won't work (applying it to the repo itself works fine, to the config setting seems to be fine).

I do not want to modify .gitmodules: It is maintained upstream.
I cannot simply reconfigure submodule.<module>.url: the Configure script 
(regularly called during each compile) does
   git submodule sync
   git submodule update --init
I could tell upstream to change these commands if I can make a good 
argument; for them, it is relevant that they can change the submodule 
URL inside .gitmodule and have it "just work" for everybody downstream.

My own use case is that I want to be able to work with various experimental local clones even if I do not have Internet access. I'm all ears if there's a way to do this without using insteadOf.

Here are the relevant two lines from the output of "git config -l" (after "git submodule init"):

url./home/jo/Projekte/perl6/bare-repos.insteadof=https://github.com submodule.3rdparty/dynasm.url=https://github.com/MoarVM/dynasm.git

Here is what "git submodule update" does:

Cloning into '3rdparty/dyncall'... fatal: unable to access 'https://github.com/MoarVM/dyncall.git/': Could not resolve host: github.com fatal: clone of 'https://github.com/MoarVM/dyncall.git' into submodule path '3rdparty/dyncall' failed

Any help appreciated!

Regards, Jo

Next: Jeff King
Message 1 of 19 in “url.<base>.insteadOf vs. submodules”
  1. ToolforgerFeb 19, 2017
  2. Jeff KingFeb 20, 2017
  3. ToolforgerFeb 20, 2017
  4. Jeff KingFeb 20, 2017
  5. ToolforgerFeb 21, 2017
  6. Jeff KingFeb 21, 2017
  7. Stefan BellerFeb 21, 2017
  8. Jeff KingFeb 21, 2017
  9. Stefan BellerFeb 21, 2017
  10. Junio C HamanoFeb 21, 2017
  11. Junio C HamanoFeb 21, 2017
  12. Stefan BellerFeb 22, 2017
  13. Junio C HamanoFeb 22, 2017
  14. Jon LoeligerFeb 22, 2017
  15. Junio C HamanoFeb 22, 2017
  16. Jeff KingFeb 22, 2017
  17. Stefan BellerFeb 22, 2017
  18. Jeff KingFeb 21, 2017
  19. Stefan BellerFeb 22, 2017

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.