Re: [PATCH 04/10] check_repository_format_gently: stop using git_config_early
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 3, 2016, 13:08 UTC
- Message-ID
- <CACsJy8Cvap9sJ39LnOCp5hMdYgoNR_HD18br+wWTWAZrCBaXaQ@mail.gmail.com>
- In-Reply-To
- <20160301144039.GD12887@sigill.intra.peff.net>
On Tue, Mar 1, 2016 at 9:40 PM, Jeff King <peff@peff.net> wrote:
Show 13 quoted lines
> There's a chicken-and-egg problem with using the regular > git_config during the repository setup process. We get > around it here by using a special interface that lets us > specify the per-repo config, and avoid calling > git_pathdup(). > > But this interface doesn't actually make sense. It will look > in the system and per-user config, too; we definitely would > not want to accept a core.repositoryformatversion from > there. > > The git_config_from_file interface is a better match, as it > lets us look at a single file.
Let's see. We look at core.worktree, core.bare, core.repositoryformatversion, and extensions.* in this code. The first three should definitely per-repo (and should be mentioned in the commit as well). But what about the last one? Any possible use case that wants to enable, say extensions.preciousobjects, for all repos? Yes we would need to switch core.repo..version to 1 to take effect, but that does not actually eliminate this case.. just thinking out loud...
-- Duy