diff options
| author | Sam Bostock <sam@sambostock.ca> | 2026-02-06 19:16:23 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-06 11:45:33 -0800 |
| commit | fb1b786ebfab18b851ce1fa94d5063daf11f647f (patch) | |
| tree | deec8e2810e3a06d9f7e18ff011d7a2cd48d1fb9 /contrib/persistent-https | |
| parent | ba447e9cec47ca5b1cc8cfeae8ca90bc962c54fa (diff) | |
| download | git-fb1b786ebfab18b851ce1fa94d5063daf11f647f.tar.gz git-fb1b786ebfab18b851ce1fa94d5063daf11f647f.zip | |
merge-ours: integrate with sparse-index
The merge-ours built-in opens the index to compare it against HEAD.
The machinery used to do this (i.e. run_diff_index()) is capable of
working with a sparse index, but the start-up sequence of this
command does not take the necessary steps, so we end up expanding the
index fully before doing the comparison.
In order to convince sparse-index.c:is_sparse_index_allowed() to
return true, we need to:
- Read basic configuration with git_default_config so that global
variables like core_apply_sparse_checkout are populated.
merge-ours currently does not read configuration at all.
- Set command_requires_full_index to 0.
With that, the command can work without expanding the index fully
before doing its work.
Signed-off-by: Sam Bostock <sam@sambostock.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
