summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-03 15:54:17 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-03 15:54:18 -0700
commit81dbbf72406c47b5199a59c6b83338b11fd3e754 (patch)
tree271b241e1a83ceaa5de40eccad6c275a72126f0e /git-submodule.sh
parent799beac15391004778186503bf198783960a82a3 (diff)
parent01d4721565f1562172149ebb91d29d6a7e7f922d (diff)
downloadgit-81dbbf72406c47b5199a59c6b83338b11fd3e754.tar.gz
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.
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 08405249ed..3e2045e52d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -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