Re: [PATCH 1/9] config: teach repo_config to allow `repo` to be NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 20, 2025 at 12:51 PM Patrick Steinhardt <ps@xxxxxx> wrote:
>
> On Tue, Mar 18, 2025 at 05:28:53PM +0530, Usman Akinyemi wrote:
> > diff --git a/config.c b/config.c
> > index 658569af08..e127afaa8f 100644
> > --- a/config.c
> > +++ b/config.c
> > @@ -2521,6 +2521,10 @@ void repo_config_clear(struct repository *repo)
> >
> >  void repo_config(struct repository *repo, config_fn_t fn, void *data)
> >  {
> > +     if (!repo) {
> > +             read_very_early_config(fn, data);
> > +             return;
> > +     }
>
> I remember discussion that `read_very_early_config()` may not be a good
> fit here. Most importantly, it ignores any configuration passed on the
> command line, which I would think is very surprising behaviour. So
> should we adapt this to instead manually call `config_with_options()`
> with the expected bits set?
Hi Patrick,

Sorry for the confusion.

There was a discussion about this here.
https://public-inbox.org/git/xmqqbjum2ayc.fsf@gitster.g/
https://public-inbox.org/git/xmqqcyeuhwqb.fsf@gitster.g/

Mainliy ignoring the configuration passed from cmdline for this purpose.

I was sending this patch again mainly for the 9/9 patch.

Thanks.
>
> Patrick





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux