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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maarten Billemont <lhunath@xxxxxxxxx> writes:

> 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.

See 33f072f (submodule sync: Update "submodule.<name>.url" for empty
directories, 2010-10-08), which introduced this behaviour.

cmd_update considers anything that has submodule.<name>.url defined as
"the user is interested", so I suspect "git submodule sync" should not do
this.

The situation 33f072f cites as needing this behaviour can easily fixed by
running 'submodule sync' after switching to the branch to which the
submodule _matters_, no?

Jens, what do you think?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]