''git submodule sync'' should not add uninitialized submodules to .git/config

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

''git submodule sync'' should not add uninitialized submodules to .git/config

From: Maarten Billemont <hidden>
Date: 2016-06-15 22:51:31

When I initialize 2/3 submodules of my git repository and do git submodule update, all is fine: Only the 2 submodules that I need are updated.

When I run a git submodule sync to update the URLs that may have been changed in .gitmodules, it ADDS the URL of the submodule that was NOT initialized, thus "initializing" it.

Now, when I run git submodule update, it starts checking out the third module and my workflow is broken.

git submodule sync should not add entries to .git/config, only update existing ones.

Re: ''git submodule sync'' should not add uninitialized submodules to .git/config

From: Phil Hord <hidden>
Date: 2016-06-15 22:51:31

On 06/23/2011 07:13 AM, Maarten Billemont wrote:
When I initialize 2/3 submodules of my git repository and do git submodule update, all is fine: Only the 2 submodules that I need are updated.

When I run a git submodule sync to update the URLs that may have been changed in .gitmodules, it ADDS the URL of the submodule that was NOT initialized, thus "initializing" it.

Now, when I run git submodule update, it starts checking out the third module and my workflow is broken.

git submodule sync should not add entries to .git/config, only update existing ones.--
Maarten,

Is it enough to similarly limit 'submodule sync' the same way you did
with 'submodule init'? Like this:
git submodule sync -- A B

From 'git help submodule':
"git submodule sync" synchronizes all submodules while "git submodule
sync — A" synchronizes submodule "A" only.

Phil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help