Re: [PATCH] setup: warn about un-enabled extensions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 14, 2020, 20:47 UTC
- Message-ID
- <xmqqimeplt7m.fsf@gitster.c.googlers.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.2007142227280.52@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 13 quoted lines
> On Tue, 14 Jul 2020, Derrick Stolee wrote: > >> If "v0" includes "core.repositoryFormatVersion is unset" then I >> would consider this to be a way to avoid all user pain, which is >> positive. > > I concur. > >> I'd be happy to test and review a patch that accomplishes this >> goal. > > Wouldn't that just be a matter of extending your patch to re-set > `has_unhandled_extensions` also for `preciousObjects` and `partialClone`?
It probably needs a bit more than that. For example there is this bit in check_repository_format_gently() that clears the unwanted extensions that we used to honor by mistake in v0 repository
if (candidate->version >= 1) {
repository_format_precious_objects = candidate->precious_objects;
set_repository_format_partial_clone(candidate->partial_clone);
repository_format_worktree_config = candidate->worktree_config;
} else {
repository_format_precious_objects = 0;
set_repository_format_partial_clone(NULL);
repository_format_worktree_config = 0;
}and the "different endgame" advocates to keep honoring these (and only these), the else clause probably needs to go. There may be some other tweaks necessary.