Re: [PATCH v2 02/12] builtin/verify-tag: stop using `the_repository`

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

 



Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> writes:

> While going through the config.c I saw the
> read_very_early_config() which read the config from the system and
> global settings and does not require any repo variable. I think,
> to teach the repo_config() to allow NULL value, we could call the
> read_very_early_config() whenever the repo is NULL as we know,
> this happens outside the repository.

Yeah, when I wrote the message you were responding to, I noticed
that do_git_config_sequence() is prepared to take NULL as repo (even
though it is a bit clunky interface; you need to futz with members
of the opts structure like opts->ignore_repo to have the code ignore
repo that is NULL).  So a caller that calls config_with_options() with
no config_source and no repo should be a good candidate to reuse.

As we positively know that we are not in a repository in our case,
using read_very_early_config() when repo is NULL sounds like a
sensible thing to do, I would think.

Thanks.






[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