git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] Move git-dir for submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 11, 2011, 23:34 UTC
Message-ID
<7vy5yzo736.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1312831022-12868-3-git-send-email-iveqy@iveqy.com>
Fredrik Gustafsson <iveqy@iveqy.com> writes:
Show 9 quoted lines
> 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.
And the index is populated to match the correct commit how?
> Tests that rely on .git being a directory have been fixed.
Thanks.

How would this interact with submodule repositories that are already initialized in-place?

Previous: Heiko Voigt
Message 8 of 8 in “submodule: move gitdir into superproject”
  1. 0/2 submodule: move gitdir into superprojectFredrik Gustafsson, Aug 8, 2011
  2. 1/2 rev-parse: add option --is-well-formed-git-dir [path]Fredrik Gustafsson, Aug 8, 2011
  3. Junio C HamanoAug 11, 2011
  4. 2/2 Move git-dir for submodulesFredrik Gustafsson, Aug 8, 2011
  5. Heiko VoigtAug 8, 2011
  6. Junio C HamanoAug 8, 2011
  7. Heiko VoigtAug 9, 2011
  8. Junio C HamanoAug 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.