summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2007-07-17 18:28:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-19 00:01:00 (GMT)
commit0cf7375542504e3762753cdc4cff3bb5c8fc628e (patch)
tree787d4b62db0742483ec9c0af1c25d8e2fa106e7c /t
parentc1c10a3f272ec0908e63bc105a5ffe94c1279fba (diff)
downloadgit-0cf7375542504e3762753cdc4cff3bb5c8fc628e.zip
git-0cf7375542504e3762753cdc4cff3bb5c8fc628e.tar.gz
git-0cf7375542504e3762753cdc4cff3bb5c8fc628e.tar.bz2
unpack-trees.c: assume submodules are clean during check-out
In particular, when moving back to a commit without a given submodule and then moving back forward to a commit with the given submodule, we shouldn't complain that updating would lose untracked file in the submodule, because git currently does not checkout subprojects during superproject check-out. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7400-submodule-basic.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 5e91db6..e8ce7cd 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -21,6 +21,10 @@ subcommands of git-submodule.
# -add an entry to .gitmodules for submodule 'example'
#
test_expect_success 'Prepare submodule testing' '
+ : > t &&
+ git-add t &&
+ git-commit -m "initial commit" &&
+ git branch initial HEAD &&
mkdir lib &&
cd lib &&
git init &&
@@ -166,4 +170,9 @@ test_expect_success 'status should be "up-to-date" after update' '
git-submodule status | grep "^ $rev1"
'
+test_expect_success 'checkout superproject with subproject already present' '
+ git-checkout initial &&
+ git-checkout master
+'
+
test_done