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

Re: [PATCH v4 3/4] submodule: record superproject gitdir during absorbgitdirs

From
Derrick Stolee <stolee@gmail.com>
Date
Nov 8, 2021, 01:07 UTC
Message-ID
<b42a3c00-2c6c-5cb6-2a3c-0aad095e6fef@gmail.com>
In-Reply-To
<YYRrH6Hw/C1qj5MV@google.com>
On 11/4/2021 7:22 PM, Emily Shaffer wrote:
Show 19 quoted lines
> On Mon, Oct 25, 2021 at 12:14:07PM -0400, Derrick Stolee wrote:
>> Since you're setting this config value inside the submodule's config,
>> what does it mean for a submodule to also be a worktree (and hence
>> require config.worktree)? What happens in this rough scenario?
>>
>>   1. git init sub
>>   2. git init super
>>   3. git -C sub worktree add super/sub
>>   4. git -C super submodule absorbgitdir sub
>>
>> I haven't actually tried running these things, but it seems unusual
>> and unexpected. This doesn't even account for cases where the repo
>> root and a worktree are both submodules within the superproject.
>>
>> If we already have protections preventing these worktrees as
>> submodules, then perhaps there is no need for work here. I'm not
>> familiar enough with the area to make a claim one way or another.
> 
> Yeah, I think there is actually a test case covering this in t7412:
...
Show 8 quoted lines
> 147 test_expect_success 'absorbing fails for a submodule with multiple worktrees' '
> 148         test_must_fail git submodule absorbgitdirs sub3 2>error &&
> 149         test_i18ngrep "not supported" error
> 150 '
> 
> That is, I think because 'sub/' in your scenario above has multiple
> worktrees, the absorbgitdirs will fail. So I won't do additional work
> here. Thanks.
Good to hear. Thanks for tracking that down.
-Stolee
Previous: Emily ShafferNext: Emily Shaffer
Message 8 of 31 in “cache parent project's gitdir in submodules”
  1. 0/4 cache parent project's gitdir in submodulesEmily Shaffer, Oct 14, 2021
  2. 1/4 t7400-submodule-basic: modernize inspect() helperEmily Shaffer, Oct 14, 2021
  3. 2/4 introduce submodule.superprojectGitDir recordEmily Shaffer, Oct 14, 2021
  4. 3/4 submodule: record superproject gitdir during absorbgitdirsEmily Shaffer, Oct 14, 2021
  5. Jonathan TanOct 18, 2021
  6. Derrick StoleeOct 25, 2021
  7. Emily ShafferNov 4, 2021
  8. Derrick StoleeNov 8, 2021
  9. Emily ShafferNov 4, 2021
  10. 4/4 submodule: record superproject gitdir during 'update'Emily Shaffer, Oct 14, 2021
  11. Derrick StoleeOct 25, 2021
  12. Derrick StoleeOct 25, 2021
  13. 0/4 cache parent project's gitdir in submodulesEmily Shaffer, Nov 4, 2021
  14. 1/4 t7400-submodule-basic: modernize inspect() helperEmily Shaffer, Nov 4, 2021
  15. 2/4 introduce submodule.superprojectGitDir recordEmily Shaffer, Nov 4, 2021
  16. Junio C HamanoNov 5, 2021
  17. Emily ShafferNov 8, 2021
  18. 3/4 submodule: record superproject gitdir during absorbgitdirsEmily Shaffer, Nov 4, 2021
  19. 4/4 submodule: record superproject gitdir during 'update'Emily Shaffer, Nov 4, 2021
  20. Junio C HamanoNov 5, 2021
  21. Ævar Arnfjörð BjarmasonNov 5, 2021
  22. Emily ShafferNov 8, 2021
  23. Ævar Arnfjörð BjarmasonNov 9, 2021
  24. Emily ShafferNov 9, 2021
  25. Emily ShafferNov 9, 2021
  26. Ævar Arnfjörð BjarmasonNov 5, 2021
  27. Emily ShafferNov 8, 2021
  28. Ævar Arnfjörð BjarmasonNov 9, 2021
  29. Derrick StoleeNov 8, 2021
  30. Emily ShafferNov 8, 2021
  31. Derrick StoleeNov 9, 2021

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.