sparse index support #2794
Sebastian Thiel (Byron)
started this conversation in
Feature Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Quick recap: What is a sparse index?
Instead of containing one entry for every file in the worktree ("regular" index structure), a sparse index only contains a subset of these. Additionaly, it contains entries to directories that are marked with the
SKIP_WORKTREEflag. All files within these entries can be skipped by functions that read / update the index and thereby increase performance.If the index file contains the the "Sparse Directory Entries" extension marked by the signature
sdir, it is classified as a sparse index.Motivation
The goal of this issue is to keep track of the requirements necessary to eventually fully integrate sparse index support for gitoxide.
This issue does not yet contain all the tasks and considerations by any means, but the goal is to add new knowledge and keep everything up to date as I go along and things become more clear.
Tasks
write::Optionsgix progresswith those findingsgit-repositoryloads worktree configs #635ensure_full_index()State, for use in subsequent functions that don't support working with sparse indexes yet.git/info/sparse-checkoutfor cone mode--coneand--no-coneflagsNotes
git sparse-checkout set / addcommands modify the list of files contained in.git/info/sparse-checkout, which uses the same syntax as a.gitignorefile. Cone mode and non-cone mode decide how this file gets interpreted. Cone mode will match only directories while non-cone mode will use the same matching logic used for.gitignorefiles. read morethat makes sense because sparse indexes mark entire directories as
SKIP_WORKTREEwhich is what cone-mode matches on, while non-cone mode can also match on single files which does not give an advantage to the amount of entries in the indexReferences
Originally proposed by Sidney Douw (@SidneyDouw) in issue #562.
All reactions