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

Re: [PATCH] Teach git submodule update to use distributed repositories

From
Nigel Magnay <nigel.magnay@gmail.com>
Date
Jul 18, 2008, 09:36 UTC
Message-ID
<320075ff0807180236u4e7f5f9bm81b702d14c052de8@mail.gmail.com>
In-Reply-To
<20080718091608.GL10151@machine.or.cz>
On Fri, Jul 18, 2008 at 10:16 AM, Petr Baudis <pasky@suse.cz> wrote:
Show 5 quoted lines
> snip
>
>        "How do we mass-supply custom submodule URLs when publishing the
>        customized main repository at a custom location too?"
>
Yes - that is an additional problem.

If I may expand the usecase just so it's clear (and to check we're talkiing the same language)

I do something like $ git remote add fred git://fredcomputer/superproject/.git $ git fetch --submodules fred

And when the recursive fetching enters a submodule, it is trying itself to do something like $ git fetch fred

At which point
1) the submodule also has a remote specified for fred. In which case
it can continue
2) the submodule doesn't have remote specified for fred. How to solve
this case? (I.E how does 'my' git 'discover' where fred's git
repositories are for the submodules?)
 a) By getting some information from fred, either in *Fred's*
superproject .git/config (or some other readable file)
 b) By reading some information out of the superproject .gitmodules
that has been fetched from fred
 c) By calculating a relative URL based on the supposition that fred
has working copies laid out in the filesystem.

I was tentatively suggesing (c), with a backup of (a) for the minority cases where you weren't pulling from a person but from a mirror or something. Having the client edit config files just feels like a hack to me, regardless of whether scripts are enabled to do it.

Previous: Petr BaudisNext: Petr Baudis
Message 16 of 23 in “Teach git submodule update to use distributed repositories”
  1. Teach git submodule update to use distributed repositoriesNigel Magnay, Jul 17, 2008
  2. Johannes SchindelinJul 17, 2008
  3. Petr BaudisJul 17, 2008
  4. Nigel MagnayJul 17, 2008
  5. Johannes SchindelinJul 17, 2008
  6. Nigel MagnayJul 17, 2008
  7. Johannes SchindelinJul 17, 2008
  8. Nigel MagnayJul 17, 2008
  9. Petr BaudisJul 17, 2008
  10. Nigel MagnayJul 18, 2008
  11. Jakub NarebskiJul 18, 2008
  12. Junio C HamanoJul 18, 2008
  13. Jakub NarebskiJul 18, 2008
  14. Nigel MagnayJul 18, 2008
  15. Petr BaudisJul 18, 2008
  16. Nigel MagnayJul 18, 2008
  17. Petr BaudisJul 18, 2008
  18. Nigel MagnayJul 18, 2008
  19. Petr BaudisJul 18, 2008
  20. Nigel MagnayJul 18, 2008
  21. Petr BaudisJul 18, 2008
  22. Mark LevedahlJul 18, 2008
  23. Nigel MagnayJul 21, 2008

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.