FW: [PATCH 5/8] submodule API & "absorbgitdirs": remove "----recursive" option
Hello.
I do not wish to get these messages any longer.
Thank you.
Phyllis
P Simpson | Application Systems Analyst Programmer - Int
Office of Technology & Cybersecurity
office: 317-233-8477
psimpson@health.in.gov
health.in.gov
-----Original Message-----
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Sent: Thursday, November 3, 2022 9:43 PM
To: Glen Choo <chooglen@google.com>
Cc: git@vger.kernel.org; Junio C Hamano <gitster@pobox.com>; Emily Shaffer <emilyshaffer@google.com>
Subject: Re: [PATCH 5/8] submodule API & "absorbgitdirs": remove "----recursive" option
**** This is an EXTERNAL email. Exercise caution. DO NOT open attachments or click links from unknown senders or unexpected email. **** ________________________________
On Thu, Nov 03 2022, Glen Choo wrote:
Show 42 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> Remove the "----recursive" option to "git submodule--helper
>> absorbgitdirs" (yes, with 4 dashes, not 2).
>
> o.O
>
> At least this makes it pretty easy to grep for usage, and it makes
> sense that we've never used it (otherwise this would've been caught).
>
>> diff --git a/submodule.c b/submodule.c index fe1e3f03905..8fa2ad457b2
>> 100644
>> --- a/submodule.c
>> +++ b/submodule.c
>> @@ -2332,8 +2331,7 @@ static void absorb_git_dir_into_superproject_recurse(const char *path)
>> * having its git directory within the working tree to the git dir nested
>> * in its superprojects git dir under modules/.
>> */
>> -void absorb_git_dir_into_superproject(const char *path,
>> - unsigned flags)
>> +void absorb_git_dir_into_superproject(const char *path)
>> {
>> int err_code;
>> const char *sub_git_dir;
>> @@ -2382,12 +2380,7 @@ void absorb_git_dir_into_superproject(const char *path,
>> }
>> strbuf_release(&gitdir);
>>
>> - if (flags & ABSORB_GITDIR_RECURSE_SUBMODULES) {
>> - if (flags & ~ABSORB_GITDIR_RECURSE_SUBMODULES)
>> - BUG("we don't know how to pass the flags down?");
>> -
>> - absorb_git_dir_into_superproject_recurse(path);
>> - }
>> + absorb_git_dir_into_superproject_recurse(path);
>> }
>
> Maybe I'm misreading, but I don't follow this change.
>
> Before, we recursed into the submodule only if the
> ABSORB_GITDIR_RECURSE_SUBMODULES flag is set (which we now know is
> never), but now we unconditionally recurse into the submodule.No, it's always set. I.e. ----recursive did nothing, but the default was to always set ABSORB_GITDIR_RECURSE_SUBMODULES, so it was never not-set (and there was no --no---recursive user).
So we should be unconditionally going on this recursive path.