Re: [PATCH v5 9/9] submodule: support reading .gitmodules when it's not in the working tree
- From
Antonio Ospite <ao2@ao2.it>
- Date
- Oct 1, 2018, 15:45 UTC
- Message-ID
- <20181001174504.684457e627ed76abee5e19b8@ao2.it>
- In-Reply-To
- <CAGZ79kYHLF0TVfVuVfKfe_A4D2QGziRCsrYpyh7wuHjdpPEkDA@mail.gmail.com>
On Thu, 27 Sep 2018 11:00:52 -0700 Stefan Beller <sbeller@google.com> wrote:
> On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite <ao2@ao2.it> wrote:
[...]
Show 6 quoted lines
> > OK, so the plan for v6 is: > > > > - avoid the corruption issues spotted by Gábor by removing the call > > to repo_read_gitmodules in builtin/grep.c (this still does not fix > > the potential problem with nested submodules). > >
Actually that is not enough to fix the inconsistent access to the object store: the functions is_submodule_active() and repo_submodule_init() too end up calling config_from_gitmodules() and need protecting as well, so I am going to put them under the git read lock and leave repo_read_gitmodules() in place for now.
Removing unneeded code can go in a possible stand-alone patch.
Show 14 quoted lines
> > - add a new test-tool which better exercises the new > > config_from_gitmodules code, > > Sounds good. > > > > > - add also a test_expect_failure test to document the use case that > > cannot be supported yet: nested submodules without .gitmodules in > > their working tree. > > Personally I would want to live in a world where we don't *have* to nor > *want* to support submodules without .gitmodules in the respective > superproject. >
Just to double check: are you referring to *nested* submodules in the sentence above?
I am asking because the whole point of this patchset is to *enable* the use of submodules without .gitmodules in the working tree of the superproject. :)
It's just that current limitations in git do not allow to support this for *nested* submodules yet.
Show 6 quoted lines
> We did support some use cases historically that I would make sure to > continue to support, but I am not sure how much effort we want to spend > on supporting further use cases of incomplete submodules. > > Feel free to do so, as such tests help to document the boundaries. >
Let's see how v6 turns out.
Thanks, Antonio
-- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?