summaryrefslogtreecommitdiff
path: root/t/t7408-submodule-reference.sh
diff options
context:
space:
mode:
authorFredrik Gustafsson <iveqy@iveqy.com>2011-08-15 21:17:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-23 04:03:38 (GMT)
commit501770e1bb5d132ae4f79aa96715f07f6b84e1f6 (patch)
tree768613c1a4ffe3767f146070ca5d764c3a6866db /t/t7408-submodule-reference.sh
parentabc06822af57347d35c0cd64b67e1faeb5b65c71 (diff)
downloadgit-501770e1bb5d132ae4f79aa96715f07f6b84e1f6.zip
git-501770e1bb5d132ae4f79aa96715f07f6b84e1f6.tar.gz
git-501770e1bb5d132ae4f79aa96715f07f6b84e1f6.tar.bz2
Move git-dir for submodules
Move git-dir for submodules into $GIT_DIR/modules/[name_of_submodule] of the superproject. This is a step towards being able to delete submodule directories without loosing the information from their .git directory as that is now stored outside the submodules work tree. This is done relying on the already existent .git-file functionality. When adding or updating a submodule whose git directory is found under $GIT_DIR/modules/[name_of_submodule], don't clone it again but simply point the .git-file to it and remove the now stale index file from it. The index will be recreated by the following checkout. This patch will not affect already cloned submodules at all. Tests that rely on .git being a directory have been fixed. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7408-submodule-reference.sh')
-rwxr-xr-xt/t7408-submodule-reference.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh
index cc16d3f..ab37c36 100755
--- a/t/t7408-submodule-reference.sh
+++ b/t/t7408-submodule-reference.sh
@@ -43,7 +43,7 @@ git commit -m B-super-added'
cd "$base_dir"
test_expect_success 'after add: existence of info/alternates' \
-'test `wc -l <super/sub/.git/objects/info/alternates` = 1'
+'test `wc -l <super/.git/modules/sub/objects/info/alternates` = 1'
cd "$base_dir"
@@ -66,7 +66,7 @@ test_expect_success 'update with reference' \
cd "$base_dir"
test_expect_success 'after update: existence of info/alternates' \
-'test `wc -l <super-clone/sub/.git/objects/info/alternates` = 1'
+'test `wc -l <super-clone/.git/modules/sub/objects/info/alternates` = 1'
cd "$base_dir"