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

Re: Location-agnostic submodules

From
Philip Oakley <philipoakley@iee.org>
Date
May 1, 2012, 19:58 UTC
Message-ID
<A688673CF88C4F469D3DF0D7E3AEFFA4@PhilipOakley>
In-Reply-To
<7v4nrzaioc.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com> Sent: Tuesday, May 01, 2012 6:57
PM
Show 10 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> Would an alternative be something like:
>>    git submodule update <module> --from <remote>
>>
>> so that the user can state which of the current submodule's remotes
>> should be used for fetching the desired update.
>
> Are you assuming that the <remote> in the above example will be different
> per invocation for a single user?

possibly, but more likely the user would have identified which is the best remote to use to find her missing sha1.

Show 6 quoted lines
>         I would imagine not---it would be more
> like "the upstream has this URL in .gitmodules, but this other mirror is
> closer to my network environment", i.e.
>
> cd <module's directory> && git config remote.origin.url $there
>

I was presuming a reverse time sequence, where the user had already set up the desired remote, but hadn't managed to change the URL in .gitmodules; but either way, the user then let's 'git submodule' do the hard work of fetching the correct sha1 to checkout.

I didn't think that there was a command yet to do the URL update, which would most likely match one of the sub-module's URLs.

> no?
>
>
Philip
Previous: Junio C HamanoNext: Heiko Voigt
Message 7 of 8 in “Location-agnostic submodules”
  1. Pierre ThierryApr 27, 2012
  2. Phil HordApr 30, 2012
  3. Pierre ThierryApr 30, 2012
  4. Phil HordMay 1, 2012
  5. Philip OakleyMay 1, 2012
  6. Junio C HamanoMay 1, 2012
  7. Philip OakleyMay 1, 2012
  8. Heiko VoigtMay 2, 2012

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.