Sparse-index: integrate with status
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest16 patches 3 repliesIn review
- v815 patches 4 repliesSuperseded
- v716 patches 15 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 14 patches | 1 reply | Superseded | |
| v5 | 14 patches | 19 replies | Superseded | |
| v4 | 12 patches | 1 reply | Superseded | |
| v3 | 12 patches | 13 replies | Superseded | |
| v2 | 8 patches | 6 replies | Superseded | |
| v1 | 10 patches | 27 replies | Superseded |
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | sparse-index: skip indexes with unmerged entriessparse-index.c t/ | +40 | 0 replies | |
| 2/16 | sparse-index: include EXTENDED flag when expandingsparse-index.c | +1 | 0 replies | |
| 3/16 | t1092: replace incorrect 'echo' with 'cat't/ | +1 | 0 replies | |
| 4/16 | t1092: expand repository data shapet/ | +40 | 0 replies | |
| 5/16 | t1092: add tests for status/add and sparse filest/ | +38 | 0 replies | |
| 6/16 | unpack-trees: preserve cache_bottomunpack-trees.c | +7 | 0 replies | |
| 7/16 | unpack-trees: compare sparse directories correctlyunpack-trees.c | +13 | 0 replies | |
| 8/16 | unpack-trees: rename unpack_nondirectories()unpack-trees.c | +7 | 0 replies | |
| 9/16 | unpack-trees: unpack sparse directory entriesunpack-trees.c | +99 | 0 replies | |
| 10/16 | dir.c: accept a directory as part of cone-mode patternsdir.c | +19 | 0 replies | |
| 11/16 | diff-lib: handle index diffs with sparse dirsdiff-lib.c | +19 | 0 replies | |
| 12/16 | status: skip sparse-checkout percentage with sparse-indext/ wt-status.c wt-status.h | +20 | 0 replies | |
| 13/16 | status: use sparse-index throughoutbuiltin/ read-cache.c t/ | +20 | 0 replies | |
| 14/16 | wt-status: expand added sparse directory entriest/ wt-status.c | +84 | 0 replies | |
| 15/16 | fsmonitor: integrate with sparse indexsparse-index.c t/ | +56 | 0 replies | |
| 16/16 | t1092: document bad sparse-checkout behaviort/ | +6 | 0 replies |
Reviews trailers per patch
All 16 patches have a Reviewed-by or Acked-by.
| Patch | Elijah Newren |
|---|---|
| 1/16 | R-b |
| 2/16 | R-b |
| 3/16 | R-b |
| 4/16 | R-b |
| 5/16 | R-b |
| 6/16 | R-b |
| 7/16 | R-b |
| 8/16 | R-b |
| 9/16 | R-b |
| 10/16 | R-b |
| 11/16 | R-b |
| 12/16 | R-b |
| 13/16 | R-b |
| 14/16 | R-b |
| 15/16 | R-b |
| 16/16 | Helped-by R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v9 00/16] Sparse-index: integrate with status
This is the first "payoff" series in the sparse-index work. It makes 'git status' very fast when a sparse-index is enabled on a repository with cone-mode sparse-checkout (and a small populated set).
This is based on ds/sparse-index-protections AND mt/add-rm-sparse-checkout. The latter branch is needed because it changes the behavior of 'git add' around sparse entries, which changes the expectations of a test added in patch 1.
The approach here is to audit the places where ensure_full_index() pops up while doing normal commands with pathspecs within the sparse-checkout definition. Each of these are checked and tested. In the end, the sparse-index is integrated with these features:
* git status
* FS Monitor index extension.
The performance tests in p2000-sparse-operations.sh improve by 95% or more, even when compared with the full-index cases, not just the sparse-index cases that previously had extra overhead.
Hopefully this is the first example of how ds/sparse-index-protections has done the basic work to do these conversions safely, making them look easier than they seemed when starting this adventure.
Thanks, -Stolee
Update in V9
============
* Fixed typo.
* All patches are marked as Reviewed-by Elijah. Thanks for the careful review!
Derrick Stolee (16):
sparse-index: skip indexes with unmerged entries
sparse-index: include EXTENDED flag when expanding
t1092: replace incorrect 'echo' with 'cat'
t1092: expand repository data shape
t1092: add tests for status/add and sparse files
unpack-trees: preserve cache_bottom
unpack-trees: compare sparse directories correctly
unpack-trees: rename unpack_nondirectories()
unpack-trees: unpack sparse directory entries dir.c: accept a directory as part of cone-mode patterns
diff-lib: handle index diffs with sparse dirs
status: skip sparse-checkout percentage with sparse-index
status: use sparse-index throughout
wt-status: expand added sparse directory entries
fsmonitor: integrate with sparse index
t1092: document bad sparse-checkout behavior
builtin/commit.c | 3 + diff-lib.c | 19 +++ dir.c | 24 +++- read-cache.c | 10 +- sparse-index.c | 27 +++- t/t1092-sparse-checkout-compatibility.sh | 168 +++++++++++++++++++++-- t/t7519-status-fsmonitor.sh | 49 +++++++ unpack-trees.c | 142 ++++++++++++++++--- wt-status.c | 65 ++++++++- wt-status.h | 1 + 10 files changed, 470 insertions(+), 38 deletions(-)
base-commit: d486ca60a51c9cb1fe068803c3f540724e95e83a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-932%2Fderrickstolee%2Fsparse-index%2Fstatus-and-add-v9
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-932/derrickstolee/sparse-index/status-and-add-v9
Pull-Request: https://github.com/gitgitgadget/git/pull/932
Range-diff vs v8:
1: 1815c148e8c ! 1: ecab56fd57f sparse-index: skip indexes with unmerged entries
@@ Commit message
conversion does not need to happen. Thus, this can be deferred until the merge machinery is made to integrate with the sparse-index.
+ Reviewed-by: Elijah Newren <[email protected]>
## sparse-index.c ##
2: 7bcde075d8d ! 2: f3de9ce7baa sparse-index: include EXTENDED flag when expanding
@@ Commit message
feature, but has no significance to its correctness in the user-facing functionality.
+ Reviewed-by: Elijah Newren <[email protected]>
## sparse-index.c ##
3: 05981e30b97 ! 3: 5b59436011c t1092: replace incorrect 'echo' with 'cat'
@@ Commit message
detection to work properly now that the 'larger-content' file actually has meaningful lines.
+ Reviewed-by: Elijah Newren <[email protected]>
## t/t1092-sparse-checkout-compatibility.sh ##
4: d38b66e9ee4 ! 4: 4d06d972911 t1092: expand repository data shape
@@ Commit message
Later tests will take advantage of these shapes, but they also deepen the tests that already exist.
+ Reviewed-by: Elijah Newren <[email protected]>
## t/t1092-sparse-checkout-compatibility.sh ##
5: 95ddd3abe4e ! 5: cc83a0cd307 t1092: add tests for status/add and sparse files
@@ Commit message
be more sensible, and this test could be modified to satisfy the new expected behavior.
+ Reviewed-by: Elijah Newren <[email protected]>
## t/t1092-sparse-checkout-compatibility.sh ##
6: b182b456613 ! 6: 18cb1f6ea9b unpack-trees: preserve cache_bottom
@@ Commit message
the cache_bottom will be modified as the cache-tree walk advances. Do not update it as well within mark_ce_used().
+ Reviewed-by: Elijah Newren <[email protected]>
## unpack-trees.c ##
7: 988ddce4d45 ! 7: bdd47bd30e0 unpack-trees: compare sparse directories correctly
@@ Commit message
exact string match on a sparse directory entry. The final check is a length comparison between the strings.
+ Reviewed-by: Elijah Newren <[email protected]>
## unpack-trees.c ##
8: d67ad048b08 ! 8: 0e4b7390f47 unpack-trees: rename unpack_nondirectories()
@@ Commit message
apply. The new name reflects that we will not recurse into trees in order to resolve the conflicts.
+ Reviewed-by: Elijah Newren <[email protected]>
## unpack-trees.c ##
9: c0b0b58584c ! 9: 602525f5d71 unpack-trees: unpack sparse directory entries
@@ Commit message
markers in the case that the entries correspond to directories and we already have a sparse directory entry.
+ Reviewed-by: Elijah Newren <[email protected]>
## unpack-trees.c ##
@@ unpack-trees.c: static int find_cache_pos(struct traverse_info *info,
+
+ /*
+ * Due to lexicographic sorting and sparse directory
-+ * entried ending with a trailing slash, our path as a
++ * entries ending with a trailing slash, our path as a
+ * sparse directory (e.g "subdir/") and our path as a
+ * file (e.g. "subdir") might be separated by other
+ * paths (e.g. "subdir-").
10: 76c7528f78f ! 10: b051c0847a5 dir.c: accept a directory as part of cone-mode patterns
@@ Commit message
assuming we are in cone mode. Since sparse index requires cone mode patterns, this is an acceptable assumption.
+ Reviewed-by: Elijah Newren <[email protected]>
## dir.c ##
11: d875a7f8585 ! 11: e749fd41cda diff-lib: handle index diffs with sparse dirs
@@ Commit message
Use diff_tree_oid() appropriately to compute the diff.
+ Reviewed-by: Elijah Newren <[email protected]>
## diff-lib.c ##
12: 2b72cc2d985 ! 12: 7f782e3fe50 status: skip sparse-checkout percentage with sparse-index
@@ Commit message
this message is equal across both modes, but instead just the important information about staged, modified, and untracked files are compared.
+ Reviewed-by: Elijah Newren <[email protected]>
## t/t1092-sparse-checkout-compatibility.sh ##
13: 1c1feef3733 ! 13: ad1715e3319 status: use sparse-index throughout
@@ Commit message
other way. Correct integration with FS Monitor will be validated in later changes.
+ Reviewed-by: Elijah Newren <[email protected]>
## builtin/commit.c ##
14: dada1b91bdc ! 14: aa2258be302 wt-status: expand added sparse directory entries
@@ Commit message
Somehow, this loop over the cache entries was not guarded by ensure_full_index() as intended.
+ Reviewed-by: Elijah Newren <[email protected]>
## t/t1092-sparse-checkout-compatibility.sh ##
15: bdc771cf373 ! 15: 1d4b1f8aea0 fsmonitor: integrate with sparse index
@@ Commit message
to a tracked directory outside of the sparse cone will trigger ensure_full_index().
+ Reviewed-by: Elijah Newren <[email protected]>
## sparse-index.c ##
-: ----------- > 16: 45861118991 t1092: document bad sparse-checkout behavior
Signature · 1 line
gitgitgadget