diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-04 00:54:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-04 00:54:18 +0200 |
commit | 81dbbf72406c47b5199a59c6b83338b11fd3e754 (patch) | |
tree | 271b241e1a83ceaa5de40eccad6c275a72126f0e /git-submodule.sh | |
parent | Merge branch 'ph/stash-rerere' (diff) | |
parent | Make 'git submodule update --force' always check out submodules. (diff) | |
download | git-81dbbf72406c47b5199a59c6b83338b11fd3e754.tar.xz git-81dbbf72406c47b5199a59c6b83338b11fd3e754.zip |
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-x | git-submodule.sh | 2 |
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 |