If a submodule directory has not been filled by "git submodule update"
yet, then "git submodule sync" must still update the super-project's
configuration for submodule.<name>.url.
This situation occurs when switching between branches with a module from
different urls and other branches without the submodule.
Signed-off-by: Andreas Köhler <andi5.py@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When "git submodule sync" synchronizes the repository URLs
it only updates submodules' .git/config. However, the old
URLs still exist in the super-project's .git/config.
Update the super-project's configuration so that commands
such as "git submodule update" use the URLs from .gitmodules.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This testcase ensures that upstream changes to submodule properties
can be updated using the sync subcommand. This particular test
changes the submodule URL upstream and uses the sync command to update
an existing checkout.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>