From: Tian Yuchen <cat@malon.dev>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, ps@pks.im, five231003@gmail.com,
hariom18599@gmail.com,
Christian Couder <christian.couder@gmail.com>,
Ayush Chandekar <ayu.chandekar@gmail.com>,
Olamide Caleb Bello <belkid98@gmail.com>
Subject: Re: [PATCH v1] repository: move fetch_if_missing into struct repository
Date: Wed, 15 Jul 2026 12:58:05 +0800 [thread overview]
Message-ID: <9914b6d6-9876-4c81-bd89-0f6eaf070e9d@malon.dev> (raw)
In-Reply-To: <xmqq5x2hq6eb.fsf@gitster.g>
On 7/15/26 11:27, Junio C Hamano wrote:
> Tian Yuchen <cat@malon.dev> writes:
>
>> The global variable 'fetch_if_missing' controls whether a missing
>> object check should prompt a lazy fetch from a promisor remote.
>> In order to continue the libification effort, move it into
>> 'struct repository' and initialize it to 1 by default to keep the
>> previous behavior.
>> ...
>> diff --git a/setup.c b/setup.c
>> index b4652651df..ce2a80ac31 100644
>> --- a/setup.c
>> +++ b/setup.c
>> @@ -1064,7 +1064,7 @@ static void setup_git_env_internal(struct repository *repo,
>> set_alternate_shallow_file(repo, shallow_file, 0);
>>
>> if (git_env_bool(NO_LAZY_FETCH_ENVIRONMENT, 0))
>> - fetch_if_missing = 0;
>> + the_repository->fetch_if_missing = 0;
>> }
>
> Could a caller pass a "repo" that is not the_repository? In other
> words, shouldn't this be
>
> repo->fetch_if_missing = 0;
>
> instead?
Thanks, will change in the next reroll!
Regards, yuchen
next prev parent reply other threads:[~2026-07-15 4:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 1:18 [PATCH v1] repository: move fetch_if_missing into struct repository Tian Yuchen
2026-07-15 3:27 ` Junio C Hamano
2026-07-15 4:58 ` Tian Yuchen [this message]
2026-07-15 6:35 ` Patrick Steinhardt
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=9914b6d6-9876-4c81-bd89-0f6eaf070e9d@malon.dev \
--to=cat@malon.dev \
--cc=ayu.chandekar@gmail.com \
--cc=belkid98@gmail.com \
--cc=christian.couder@gmail.com \
--cc=five231003@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hariom18599@gmail.com \
--cc=ps@pks.im \
/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