Merge branch 'sz/submodule-force-update'
"git submodule update --force" used to leave the working tree of the submodule intact when there were local changes. It is more intiutive to make "--force" a sign to run "checkout -f" to overwrite them. * sz/submodule-force-update: Make 'git submodule update --force' always check out submodules.
This commit is contained in:
@ -603,7 +603,7 @@ Maybe you want to use 'update --init'?")"
|
||||
die "$(eval_gettext "Unable to find current revision in submodule path '\$sm_path'")"
|
||||
fi
|
||||
|
||||
if test "$subsha1" != "$sha1"
|
||||
if test "$subsha1" != "$sha1" -o -n "$force"
|
||||
then
|
||||
subforce=$force
|
||||
# If we don't already have a -f flag and the submodule has never been checked out
|
||||
|
||||
Reference in New Issue
Block a user