Re: [PATCH v5 00/21] Sparse Index: Design, Format, Tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2021, 20:11 UTC
- Message-ID
- <xmqqsg4ccsgd.fsf@gitster.g>
- In-Reply-To
- <pull.883.v5.git.1617109864.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> @@ repo-settings.c: void prepare_repo_settings(struct repository *r) > + * Initialize this as off. > + */ > + r->settings.sparse_index = 0; > -+ if (!repo_config_get_bool(r, "extensions.sparseindex", &value) && value) > ++ if (!repo_config_get_bool(r, "index.sparse", &value) && value) > + r->settings.sparse_index = 1; > }
It would be helpful to have a way for the repository owner to say "Even if the version of Git may be capable of handling 'sdir' extension, and my checkout uses sparse-cone settings, I do not want to use it", and the other way around, i.e. "Even if my checkout currently does not use sparse-cone settings, do use 'sdir' extension". But for that, .sparse_index member may need to be tristate (i.e. forbidden, enable-if-needed, use-even-unneeded)?
We have a similar setting in index.version; I believe we always auto-demote 3 down to 2 when extended flags are not used, and I think "always auto-demote" would be sufficient (iow, "use-even-unneeded" may not be necessary, even though that might help debugging).
Thanks.