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

Re: submodule network operations [WAS: Re: [RFC/PATCH 0/4] working tree operations: support superprefix]

From
Stefan Beller <sbeller@google.com>
Date
Jan 20, 2017, 01:22 UTC
Message-ID
<CAGZ79kaS7zt3DKrRuqzzODc1HHEP-xd-8HBC0JA-HvmqAJOZfw@mail.gmail.com>
In-Reply-To
<e6c5567a-2032-c598-97c8-08518f86b611@gmail.com>
Show 10 quoted lines
>> Between the init and the update step you can modify the URLs.
>> These commands are just a repetition from the first email, but the
>> git commands can be viewed as moving from one state to another
>> for submodules; submodules itself can be seen as a state machine
>> according to that proposed documentation. Maybe such a state machine
>> makes it easier to understand for some people.
>
>
> "Between the init and the update step you can modify the URLs."  Yes I can
> and have to... wish it was not this way.

So how would yo u rather want to do it? look at the .gitmodules file beforehand and then run a "submodule update" ? Or a thing like

    git -c url.https://internal.insteadOf git://github.com/ \
        -c submodule.record-rewritten-urls submodule update

(no need for init there as theoretically there is not need for such an intermediate step)

Show 14 quoted lines
>> [remote "origin"]
>>    url = https://github.com/..
>> [remote "inhouse"]
>>    url = https://inhouse.corp/..
>>
>> But where do we clone it from?
>> (Or do we just do a "git init" on that submodule and fetch
>> from both remotes? in which order?)
>
> origin by default and inhouse if specified. There is already a implied
> default (origin). The idea was not to do both but rather what is specified.
> Origin and inhouse are just names for remotes. If one wanted a
> "--all-remotes" could pull from everywhere in the Ether if feature was to be
> implemented.

How is origin implied to be the default? Should there be an order (e.g. if you cannot find it at inhouse get it from github, if they are down, get it from kernel.org)

Previous: Brian J. DavisNext: Brian J. Davis
Message 5 of 8 in “submodule network operations [WAS: Re: [RFC/PATCH 0/4] working tree operations: support superprefix]”
  1. Stefan BellerJan 13, 2017
  2. Brian J. DavisJan 15, 2017
  3. Stefan BellerJan 17, 2017
  4. Brian J. DavisJan 19, 2017
  5. Stefan BellerJan 20, 2017
  6. Brian J. DavisJan 21, 2017
  7. Stefan BellerJan 24, 2017
  8. Brian J. DavisJan 25, 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.