author | Fredrik Gustafsson <iveqy@iveqy.com> | |
Mon, 15 Aug 2011 21:17:47 +0000 (23:17 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 23 Aug 2011 04:03:38 +0000 (21:03 -0700) | ||
commit | 501770e1bb5d132ae4f79aa96715f07f6b84e1f6 | |
tree | 768613c1a4ffe3767f146070ca5d764c3a6866db | tree | snapshot |
parent | abc06822af57347d35c0cd64b67e1faeb5b65c71 | commit | diff |
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>
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>
git-submodule.sh | diff | blob | history | |
t/t7406-submodule-update.sh | diff | blob | history | |
t/t7408-submodule-reference.sh | diff | blob | history |