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

Re: [PATCHv3 3/3] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

From
BWBrandon Williams <bmwill@google.com>
Date
Jan 25, 2017, 23:39 UTC
Message-ID
<20170125233954.GD83343@google.com>
In-Reply-To
<20170125230450.4393-1-sbeller@google.com>
On 01/25, Stefan Beller wrote:
Show 17 quoted lines
> Consider having a submodule 'sub' and a nested submodule at 'sub/nested'.
> When nested is already absorbed into sub, but sub is not absorbed into
> its superproject, then we need to fixup the gitfile and core.worktree
> setting for 'nested' when absorbing 'sub', but we do not need to move
> its git dir around.
> 
> Previously 'nested's gitfile contained "gitdir: ../.git/modules/nested";
> it has to be corrected to "gitdir: ../../.git/modules/sub1/modules/nested".
> 
> An alternative I considered to do this work lazily, i.e. when resolving
> "../.git/modules/nested", we would notice the ".git" being a gitfile
> linking to another path.  That seemed to be robuster by design, but harder
> to get the implementation right.  Maybe we have to do that anyway once we
> try to have submodules and worktrees working nicely together, but for now
> just produce 'correct' (i.e. direct) pointers.
> 
> Signed-off-by: Stefan Beller <sbeller@google.com>
Looks good to me!
-- 
Brandon Williams
Previous: Stefan Beller
Message 13 of 13 in “submodule absorbing: fix worktree/gitdir pointers recursively for non-moves”
  1. submodule absorbing: fix worktree/gitdir pointers recursively for non-movesStefan Beller, Jan 24, 2017
  2. Brandon WilliamsJan 24, 2017
  3. Stefan BellerJan 24, 2017
  4. Brandon WilliamsJan 24, 2017
  5. 0/3 fix recursive submodule absorbingStefan Beller, Jan 24, 2017
  6. 1/3 Add gentle version of resolve_git_dirStefan Beller, Jan 24, 2017
  7. 2/3 cache.h: expose the dying procedure for reading gitlinksStefan Beller, Jan 24, 2017
  8. 3/3 submodule absorbing: fix worktree/gitdir pointers recursively for non-movesStefan Beller, Jan 24, 2017
  9. Brandon WilliamsJan 25, 2017
  10. Stefan BellerJan 25, 2017
  11. Junio C HamanoJan 25, 2017
  12. 3/3 submodule absorbing: fix worktree/gitdir pointers recursively for non-movesStefan Beller, Jan 25, 2017
  13. Brandon WilliamsJan 25, 2017

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.