summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-03 15:54:17 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-03 15:54:18 -0700
commit81dbbf72406c47b5199a59c6b83338b11fd3e754 (patch)
tree271b241e1a83ceaa5de40eccad6c275a72126f0e /t
parentMerge branch 'ph/stash-rerere' (diff)
parentMake 'git submodule update --force' always check out submodules. (diff)
downloadtgif-81dbbf72406c47b5199a59c6b83338b11fd3e754.tar.xz
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 't')
-rwxr-xr-xt/t7406-submodule-update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 646298b212..15426530e4 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -123,6 +123,18 @@ test_expect_success 'submodule update should throw away changes with --force ' '
)
'
+test_expect_success 'submodule update --force forcibly checks out submodules' '
+ (cd super &&
+ (cd submodule &&
+ rm -f file
+ ) &&
+ git submodule update --force submodule &&
+ (cd submodule &&
+ test "$(git status -s file)" = ""
+ )
+ )
+'
+
test_expect_success 'submodule update --rebase staying on master' '
(cd super/submodule &&
git checkout master