@@ -17,5 +17,57 @@ about refactoring projects versus projects that implement new
1717features" in the [ general application information] ( https://git.github.io/General-Application-Information )
1818page though.
1919
20- ### Idea X
21- _ TBD: Ideas to be added based on discussion with community_
20+ ### More Sparse Index Integrations
21+
22+ The [ spare index feature] ( https://github.blog/2021-11-10-make-your-monorepo-feel-small-with-gits-sparse-index/ )
23+ accelerates Git commands when using
24+ [ sparse-checkout in cone mode] ( https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ ) .
25+ This works by modifying the on-disk index file in a way that includes
26+ "sparse directory" entries instead of only file entries. This requires
27+ care when enabling the sparse index for different commands, as custom
28+ logic might be necessary. At minimum, interaction with the sparse index
29+ needs to be carefully tested in the Git test suite when enabling it.
30+
31+ The most-used commands have already been integrated with the sparse
32+ index feature. This process usually takes a few steps:
33+
34+ 1 . Add tests to [ ` t1092-sparse-checkout-compatibility.sh ` ] ( https://github.com/git/git/blob/master/t/t1092-sparse-checkout-compatibility.sh )
35+ for the builtin, with a focus on what happens for paths outside of the
36+ sparse-checkout cone.
37+ 2 . Disable [ the ` command_requires_full_index ` setting] ( https://github.com/git/git/blob/master/repository.h#L35 )
38+ in the builtin and ensure the tests pass.
39+ 3 . If the tests do not pass, then alter the logic to work with the sparse index.
40+ 4 . Add tests to [ check that a sparse index stays sparse] ( https://github.com/git/git/blob/38062e73e009f27ea192d50481fcb5e7b0e9d6eb/t/t1092-sparse-checkout-compatibility.sh#L873-L939 ) .
41+ 5 . Add [ performance tests] ( https://github.com/git/git/blob/master/t/perf/p2000-sparse-operations.sh )
42+ to demonstrate speedup.
43+
44+ Here is a list of builtins that could be integrated with the sparse index.
45+ They are generally organized in order of least-difficult to most-difficult.
46+ This allows the student to gain partial success early in the project and
47+ the student can complete as many as possible in the timeframe (without
48+ expectation that _ all_ will be completed during the project).
49+
50+ * ` git mv `
51+ * ` git rm `
52+ * ` git grep `
53+ * ` git rev-parse `
54+ * ` git fsck `
55+ * ` git check-attr `
56+ * ` git describe `
57+ * ` git diff-files `
58+ * ` git diff-index `
59+ * ` git diff-tree `
60+ * ` git worktree `
61+ * ` git write-tree `
62+ * ` git apply `
63+ * ` git am `
64+ * ` git checkout--worker ` (for parallel checkout)
65+ * ` git merge-index `
66+ * ` git rerere `
67+
68+ Project Size: Medium
69+ Languages: C, shell(bash)
70+
71+ Co-Mentors:
72+ * Derrick Stolee
` <[email protected] > ` 73+ * Victoria Dye
` <[email protected] > `
0 commit comments