{"thread":{"id":"38853","subject":"submodule.$name.url is ignored during submodule update","startedAt":"2015-03-19T09:27:50Z","lastAt":"2015-03-19T21:29:36Z","messageCount":4,"participants":["Dmitry Neverov","Doug Kelly"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"258018","messageId":"CAC+L6n1RjvzcqX33VDvcM-4CpQPHeaddA7Dhs9S+ma+T+DN28Q@mail.gmail.com","threadId":"38853","inReplyTo":null,"subject":"submodule.$name.url is ignored during submodule update","fromName":"Dmitry Neverov","fromEmail":"dmitry.neverov@gmail.com","sentAt":"2015-03-19T09:27:50Z","receivedAt":"2015-03-19T09:27:50Z","isPatch":false,"sender":{"key":"dmitry.neverov@gmail.com","avatar":null},"body":"Hi,\n\nI've noticed that the 'submodule.$name.url' config parameter from the\nmain repository is ignored when a submodule needs to be updated, the\nsubmodule's 'remote.origin.url' is used instead. Is there any way to\ncustomize the submodule url for both the initial clone and for\nupdates?\n\n--\nDmitry\n"},{"id":"258024","messageId":"CAEtYS8TM6KWEjpcOLL8qRmN1yEo4JGQLLJCkkQ+GHaX7F-aLJA@mail.gmail.com","threadId":"38853","inReplyTo":"CAC+L6n1RjvzcqX33VDvcM-4CpQPHeaddA7Dhs9S+ma+T+DN28Q@mail.gmail.com","subject":"Re: submodule.$name.url is ignored during submodule update","fromName":"Doug Kelly","fromEmail":"dougk.ff7@gmail.com","sentAt":"2015-03-19T13:09:22Z","receivedAt":"2015-03-19T13:09:22Z","isPatch":false,"sender":{"key":"dougk.ff7@gmail.com","avatar":"https://avatars.githubusercontent.com/u/93357?v=4"},"body":"On Thu, Mar 19, 2015 at 4:27 AM, Dmitry Neverov\n<dmitry.neverov@gmail.com> wrote:\n> Hi,\n>\n> I've noticed that the 'submodule.$name.url' config parameter from the\n> main repository is ignored when a submodule needs to be updated, the\n> submodule's 'remote.origin.url' is used instead. Is there any way to\n> customize the submodule url for both the initial clone and for\n> updates?\n\nThat's what \"git submodule sync\" is for. It will synchronize the url\nin .gitmodules with\nto the remote.origin.url for each submodule.  I'm not sure about the second part\nof your question: are you talking about using different URLs for the\ninitial clone\nand updates?\n"},{"id":"258025","messageId":"CAC+L6n1Qgh+YFfFnbLe0_3JgCMBXdya+pPraU0ZsXn0HJecaeQ@mail.gmail.com","threadId":"38853","inReplyTo":"CAEtYS8TM6KWEjpcOLL8qRmN1yEo4JGQLLJCkkQ+GHaX7F-aLJA@mail.gmail.com","subject":"Re: submodule.$name.url is ignored during submodule update","fromName":"Dmitry Neverov","fromEmail":"dmitry.neverov@gmail.com","sentAt":"2015-03-19T13:16:50Z","receivedAt":"2015-03-19T13:16:50Z","isPatch":false,"sender":{"key":"dmitry.neverov@gmail.com","avatar":null},"body":"I want to use a custom url for both initial submodule clone and\nsubmodule update. Git submodule man page states that if I run 'git\nsubmodule init' and then change the 'submodule.$name.url' in the main\nrepository config, git will use this url instead of url in\n.gitmodules. Git does use the custom url for initial submodule clone,\nbut doesn't use it when cloned submodule needs to be updated. Is that\nby design?\n\nOn Thu, Mar 19, 2015 at 2:09 PM, Doug Kelly <dougk.ff7@gmail.com> wrote:\n> On Thu, Mar 19, 2015 at 4:27 AM, Dmitry Neverov\n> <dmitry.neverov@gmail.com> wrote:\n>> Hi,\n>>\n>> I've noticed that the 'submodule.$name.url' config parameter from the\n>> main repository is ignored when a submodule needs to be updated, the\n>> submodule's 'remote.origin.url' is used instead. Is there any way to\n>> customize the submodule url for both the initial clone and for\n>> updates?\n>\n> That's what \"git submodule sync\" is for. It will synchronize the url\n> in .gitmodules with\n> to the remote.origin.url for each submodule.  I'm not sure about the second part\n> of your question: are you talking about using different URLs for the\n> initial clone\n> and updates?\n"},{"id":"258061","messageId":"CAC+L6n0FFtCiVWjS-TSBJRp0f81fmMHPitBeM-M6HiN-LJ_LxQ@mail.gmail.com","threadId":"38853","inReplyTo":"CAC+L6n1Qgh+YFfFnbLe0_3JgCMBXdya+pPraU0ZsXn0HJecaeQ@mail.gmail.com","subject":"Re: submodule.$name.url is ignored during submodule update","fromName":"Dmitry Neverov","fromEmail":"dmitry.neverov@gmail.com","sentAt":"2015-03-19T21:29:36Z","receivedAt":"2015-03-19T21:29:36Z","isPatch":false,"sender":{"key":"dmitry.neverov@gmail.com","avatar":null},"body":"Sorry, my bad. I thought 'git submodule sync' changes only\n'submodule.$name.url' in main repository config, but it also changes\nthe 'remote.origin.url' in submodule's config. I indeed ran 'git\nsubmodule sync', that's why the default url was used even though\n'submodule.$name.url' had a different value.\n\nOn Thu, Mar 19, 2015 at 2:16 PM, Dmitry Neverov\n<dmitry.neverov@gmail.com> wrote:\n> I want to use a custom url for both initial submodule clone and\n> submodule update. Git submodule man page states that if I run 'git\n> submodule init' and then change the 'submodule.$name.url' in the main\n> repository config, git will use this url instead of url in\n> .gitmodules. Git does use the custom url for initial submodule clone,\n> but doesn't use it when cloned submodule needs to be updated. Is that\n> by design?\n>\n> On Thu, Mar 19, 2015 at 2:09 PM, Doug Kelly <dougk.ff7@gmail.com> wrote:\n>> On Thu, Mar 19, 2015 at 4:27 AM, Dmitry Neverov\n>> <dmitry.neverov@gmail.com> wrote:\n>>> Hi,\n>>>\n>>> I've noticed that the 'submodule.$name.url' config parameter from the\n>>> main repository is ignored when a submodule needs to be updated, the\n>>> submodule's 'remote.origin.url' is used instead. Is there any way to\n>>> customize the submodule url for both the initial clone and for\n>>> updates?\n>>\n>> That's what \"git submodule sync\" is for. It will synchronize the url\n>> in .gitmodules with\n>> to the remote.origin.url for each submodule.  I'm not sure about the second part\n>> of your question: are you talking about using different URLs for the\n>> initial clone\n>> and updates?\n"}]}