-
-
Notifications
You must be signed in to change notification settings - Fork 353
sparse index support #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks so much for setting up this tracking issue and taking the lead on this! I can't wait to see more and more of these boxes ticked.
I think it's OK to focus on cone mode but fail gracefully in non-cone mode from day one. From there we can decide if it's worth maintaining non-cone mode as well, probably based on people actually requesting it to be supported. |
For posterity, since I keep finding myself puzzled about what states sparse indices exist in, here is an analysis in code that sums it up. |
Interesting bits of this recently added technical document
|
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_WORKTREE
flag. 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::Options
gix progress
with those findingsgit-repository
loads worktree configs #635ensure_full_index()
State
, for use in subsequent functions that don't support working with sparse indexes yet.git/info/sparse-checkout
for cone mode--cone
and--no-cone
flagsNotes
git sparse-checkout set / add
commands modify the list of files contained in.git/info/sparse-checkout
, which uses the same syntax as a.gitignore
file. 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.gitignore
files. read morethat makes sense because sparse indexes mark entire directories as
SKIP_WORKTREE
which 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
The text was updated successfully, but these errors were encountered: