From: Derrick Stolee <stolee@gmail.com>
To: Emily Shaffer <emilyshaffer@google.com>
Cc: Jonathan Tan <jonathantanmy@google.com>, git@vger.kernel.org
Subject: Re: [PATCH v4 3/4] submodule: record superproject gitdir during absorbgitdirs
Date: Sun, 7 Nov 2021 20:07:00 -0500 [thread overview]
Message-ID: <b42a3c00-2c6c-5cb6-2a3c-0aad095e6fef@gmail.com> (raw)
In-Reply-To: <YYRrH6Hw/C1qj5MV@google.com>
On 11/4/2021 7:22 PM, Emily Shaffer wrote:
> 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:
...
> 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
next prev parent reply other threads:[~2021-11-08 1:07 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 20:34 [PATCH v4 0/4] cache parent project's gitdir in submodules Emily Shaffer
2021-10-14 20:34 ` [PATCH v4 1/4] t7400-submodule-basic: modernize inspect() helper Emily Shaffer
2021-10-14 20:34 ` [PATCH v4 2/4] introduce submodule.superprojectGitDir record Emily Shaffer
2021-10-14 20:34 ` [PATCH v4 3/4] submodule: record superproject gitdir during absorbgitdirs Emily Shaffer
2021-10-18 23:18 ` Jonathan Tan
2021-10-25 16:14 ` Derrick Stolee
2021-11-04 23:22 ` Emily Shaffer
2021-11-08 1:07 ` Derrick Stolee [this message]
2021-11-04 22:09 ` Emily Shaffer
2021-10-14 20:34 ` [PATCH v4 4/4] submodule: record superproject gitdir during 'update' Emily Shaffer
2021-10-25 16:17 ` Derrick Stolee
2021-10-25 16:19 ` [PATCH v4 0/4] cache parent project's gitdir in submodules Derrick Stolee
2021-11-04 23:49 ` [PATCH v5 " Emily Shaffer
2021-11-04 23:49 ` [PATCH v5 1/4] t7400-submodule-basic: modernize inspect() helper Emily Shaffer
2021-11-04 23:49 ` [PATCH v5 2/4] introduce submodule.superprojectGitDir record Emily Shaffer
2021-11-05 7:50 ` Junio C Hamano
2021-11-08 23:16 ` Emily Shaffer
2021-11-04 23:49 ` [PATCH v5 3/4] submodule: record superproject gitdir during absorbgitdirs Emily Shaffer
2021-11-04 23:49 ` [PATCH v5 4/4] submodule: record superproject gitdir during 'update' Emily Shaffer
2021-11-05 4:49 ` Junio C Hamano
2021-11-05 8:43 ` Ævar Arnfjörð Bjarmason
2021-11-08 23:21 ` Emily Shaffer
2021-11-09 0:42 ` Ævar Arnfjörð Bjarmason
2021-11-09 20:36 ` Emily Shaffer
2021-11-09 21:46 ` Emily Shaffer
2021-11-05 8:51 ` Ævar Arnfjörð Bjarmason
2021-11-08 23:22 ` Emily Shaffer
2021-11-09 1:12 ` Ævar Arnfjörð Bjarmason
2021-11-08 1:24 ` [PATCH v5 0/4] cache parent project's gitdir in submodules Derrick Stolee
2021-11-08 23:11 ` Emily Shaffer
2021-11-09 15:58 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b42a3c00-2c6c-5cb6-2a3c-0aad095e6fef@gmail.com \
--to=stolee@gmail.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).