From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, newren@gmail.com
Subject: Re: [PATCH 1/3] t6437: run absorbgitdirs on repos
Date: Wed, 08 Sep 2021 15:20:18 -0700 [thread overview]
Message-ID: <xmqqwnnq1zh9.fsf@gitster.g> (raw)
In-Reply-To: <942d3ce2d3cf96192c7e9d5860a18c333dd08acf.1631123754.git.jonathantanmy@google.com> (Jonathan Tan's message of "Wed, 8 Sep 2021 11:18:13 -0700")
Jonathan Tan <jonathantanmy@google.com> writes:
> The submodule merge code is being transitioned away from
> add_submodule_odb() to repo_submodule_init(), and the latter does not
> support submodules that have their .git directories in the worktree
> (instead of in .git/modules). Migrate the test code by calling
> absorbgitdirs wherever necessary to place the .git directories of
> submodules in .git/modules of the superproject.
It is wonderful that we can work with the "absorbed" form of the
submodule repositories, and having all the submodules in "absorbed"
form may be ideal in the longer term, but I fail to convince myself
that this particular change to test script is a good idea.
After all, if you are not cloning from somebody else but creating
a new submodule in a superproject you have (whether that was locally
created or cloned from elsewhere), wouldn't it more natural to have
a submodule that is not "absorbed" there? Is it easy to create an
"absorbed" submodule locally?
The change to tests in this patch may make things work with the
repo_submodule_init() that is incapable of work with submodules with
in-worktree .git repository. In theory, the users can do the same,
i.e. have an extra "git submodule absorbgitdirs" call, when adding a
new submodule, to make things work with repo_submodule_init(), too.
But that sounds like a workaround, not a feature.
Quite honestly, if repo_submodule_init() can only work with the
"absorbed" form, isn't it simply a bug?
Two independent (i.e. we can do either or both) things may improve
the situation:
- allow repo_submodule_init() to work on both forms (in place---no
cheating by calling "absorb" behind user's back).
- teach "git submodule add" to transition an old-style submodule
into the "absorbed" form (either with an option, or do so by
default with an escape hatch to disable).
The latter indirectly attacks the "repo_submodule_init() can only
work with absorbed form" issue by making it harder to create a
non-absorbed submodule to begin with.
Hmm?
next prev parent reply other threads:[~2021-09-08 22:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 18:18 [PATCH 0/3] More add_submodule_odb() cleanup in merge code Jonathan Tan
2021-09-08 18:18 ` [PATCH 1/3] t6437: run absorbgitdirs on repos Jonathan Tan
2021-09-08 22:02 ` Jonathan Tan
2021-09-08 22:20 ` Junio C Hamano [this message]
2021-09-09 17:47 ` Jonathan Tan
2021-09-08 18:18 ` [PATCH 2/3] revision: remove "submodule" from opt struct Jonathan Tan
2021-09-08 18:18 ` [PATCH 3/3] DO NOT SUBMIT commit-reach,revision: verify non-mixing Jonathan Tan
2021-09-09 15:26 ` [PATCH 0/3] More add_submodule_odb() cleanup in merge code Elijah Newren
2021-09-09 17:51 ` Jonathan Tan
2021-09-09 18:47 ` [PATCH v2 " Jonathan Tan
2021-09-09 18:47 ` [PATCH v2 1/3] submodule: remove unnecessary unabsorbed fallback Jonathan Tan
2021-09-09 18:47 ` [PATCH v2 2/3] repository: support unabsorbed in repo_submodule_init Jonathan Tan
2021-09-09 18:47 ` [PATCH v2 3/3] revision: remove "submodule" from opt struct Jonathan Tan
2021-09-14 1:31 ` [PATCH v2 0/3] More add_submodule_odb() cleanup in merge code Elijah Newren
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwnnq1zh9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=newren@gmail.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.
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 NNTP newsgroup(s).