path: root/config.c
diff options
authorDerrick Stolee <>2019-11-21 22:04:40 (GMT)
committerJunio C Hamano <>2019-11-22 07:11:44 (GMT)
commit879321eb0bec25779386445d65242452825155be (patch)
treee7a7f3a7c1e755c8b91e45666c60fae7f818b36c /config.c
parente6152e35ff287ab58e2c17065f02cb1be9f4a0aa (diff)
sparse-checkout: add 'cone' mode
The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new Boolean config option, core.sparseCheckoutCone, to indicate that we expect the sparse-checkout file to contain a more limited set of patterns. This is a separate config setting from core.sparseCheckout to avoid breaking older clients by introducing a tri-state option. The config option does nothing right now, but will be expanded upon in a later commit. Signed-off-by: Derrick Stolee <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'config.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index e7052b3..d75f88c 100644
--- a/config.c
+++ b/config.c
@@ -1364,6 +1364,11 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
return 0;
+ if (!strcmp(var, "core.sparsecheckoutcone")) {
+ core_sparse_checkout_cone = git_config_bool(var, value);
+ return 0;
+ }
if (!strcmp(var, "core.precomposeunicode")) {
precomposed_unicode = git_config_bool(var, value);
return 0;