summaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2012-03-16 20:18:07 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2012-03-16 20:18:07 +0800
commitd90b16ed421eb51fc4d7c6bda5f3332cc2e3aece (patch)
tree2d90d25ecbe794492f0fb267f31af8a1f646327d /t/t7400-submodule-basic.sh
parentl10n: Improve zh_CN translation for msg "not something we can merge" (diff)
parentGit 1.7.10-rc1 (diff)
downloadtgif-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.tar.xz
Merge v1.7.10-rc0 for git l10n update
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 695f7afdf3..b377a7af28 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -79,6 +79,15 @@ test_expect_success 'submodule add' '
cd addtest &&
git submodule add -q "$submodurl" submod >actual &&
test ! -s actual &&
+ echo "gitdir: ../.git/modules/submod" >expect &&
+ test_cmp expect submod/.git &&
+ (
+ cd submod &&
+ git config core.worktree >actual &&
+ echo "../../../submod" >expect &&
+ test_cmp expect actual &&
+ rm -f actual expect
+ ) &&
git submodule init
) &&
@@ -498,4 +507,17 @@ test_expect_success 'relative path works with user@host:path' '
)
'
+test_expect_success 'moving the superproject does not break submodules' '
+ (
+ cd addtest &&
+ git submodule status >expect
+ )
+ mv addtest addtest2 &&
+ (
+ cd addtest2 &&
+ git submodule status >actual &&
+ test_cmp expect actual
+ )
+'
+
test_done