Junio C Hamano <gitster@xxxxxxxxx> writes: > The current one on the table is NOT > <20200714040616.GA2208896@xxxxxxxxxx> but the two patches > > <1b26d9710a7ffaca0bad1f4e1c1729f501ed1559.1594690017.git.gitgitgadget@xxxxxxxxx> > <e11e973c6fff6a523da090f7294234902e65a9d0.1594690017.git.gitgitgadget@xxxxxxxxx> > > For example it special cases only the worktreeconfig and nothing > else, even though I suspect that other configuration variables were > also honored by mistake. The attached may be a less ambitious and less risky update for the upcoming release. It is to be applied on top of the two-patch series from Derrick, and just marks the other "known and honored back then by mistake" extensions as OK to be there for upgrading. Thoughts? If people are happy with that, then we could apply and cut an -rc1 with it. Or if we are OK with the "just special case worktreeconfig; other extensions may have the same issue but we haven't heard actual complaints so we will leave them untouched", then -rc1 can be done with just those two patches. Now I do need to shift my attention to other topics in flight. Thanks. setup.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/setup.c b/setup.c index 65270440a9..a072c76d05 100644 --- a/setup.c +++ b/setup.c @@ -456,27 +456,32 @@ static int check_repo_format(const char *var, const char *value, void *vdata) data->version = git_config_int(var, value); else if (skip_prefix(var, "extensions.", &ext)) { /* - * record any known extensions here; otherwise, - * we fall through to recording it as unknown, and - * check_repository_format will complain + * Grandfather extensions that were known in 2.27 and + * were honored by mistake even in v0 repositories; it + * shoudn't be an error to upgrade v0 to v1 with them + * in the repository, as they couldn't have been used + * for incompatible purposes by the end user. */ - int is_unallowed_extension = 1; + int unallowed_in_v0 = 1; - if (!strcmp(ext, "noop")) - ; - else if (!strcmp(ext, "preciousobjects")) + if (!strcmp(ext, "noop")) { + unallowed_in_v0 = 0; + } else if (!strcmp(ext, "preciousobjects")) { data->precious_objects = git_config_bool(var, value); - else if (!strcmp(ext, "partialclone")) { + unallowed_in_v0 = 0; + } else if (!strcmp(ext, "partialclone")) { if (!value) return config_error_nonbool(var); data->partial_clone = xstrdup(value); + unallowed_in_v0 = 0; } else if (!strcmp(ext, "worktreeconfig")) { data->worktree_config = git_config_bool(var, value); - is_unallowed_extension = 0; - } else + unallowed_in_v0 = 0; + } else { string_list_append(&data->unknown_extensions, ext); + } - data->has_unallowed_extensions |= is_unallowed_extension; + data->has_unallowed_extensions |= unallowed_in_v0; } return read_worktree_config(var, value, vdata);