diff options
author | Fredrik Gustafsson <iveqy@iveqy.com> | 2011-08-15 23:17:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-22 21:03:38 -0700 |
commit | 501770e1bb5d132ae4f79aa96715f07f6b84e1f6 (patch) | |
tree | 768613c1a4ffe3767f146070ca5d764c3a6866db /t/t7408-submodule-reference.sh | |
parent | abc06822af57347d35c0cd64b67e1faeb5b65c71 (diff) | |
download | git-501770e1bb5d132ae4f79aa96715f07f6b84e1f6.tar.gz |
Move git-dir for submodulesfg/submodule-git-file-git-dir
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-x | t/t7408-submodule-reference.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh index cc16d3f05d..ab37c368d0 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" |