sparse-index: add index.sparse config option
When enabled, this config option signals that index writes should attempt to use sparse-directory entries. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0938e6ff55
commit
58300f4743
@ -85,4 +85,11 @@ void prepare_repo_settings(struct repository *r)
|
||||
* removed.
|
||||
*/
|
||||
r->settings.command_requires_full_index = 1;
|
||||
|
||||
/*
|
||||
* Initialize this as off.
|
||||
*/
|
||||
r->settings.sparse_index = 0;
|
||||
if (!repo_config_get_bool(r, "index.sparse", &value) && value)
|
||||
r->settings.sparse_index = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user