diff options
| author | Victoria Dye <vdye@github.com> | 2021-11-29 15:52:41 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-11-29 12:51:26 -0800 |
| commit | 20ec2d034cda1afef15a4dcc6e275d7a69413510 (patch) | |
| tree | 1461ef3b8acc4895f8e31ded1d9674c8fb0a7318 /commit-graph.c | |
| parent | reset: integrate with sparse index (diff) | |
| download | git-20ec2d034cda1afef15a4dcc6e275d7a69413510.tar.gz git-20ec2d034cda1afef15a4dcc6e275d7a69413510.zip | |
reset: make sparse-aware (except --mixed)
Remove `ensure_full_index` guard on `prime_cache_tree` and update
`prime_cache_tree_rec` to correctly reconstruct sparse directory entries in
the cache tree. While processing a tree's entries, `prime_cache_tree_rec`
must determine whether a directory entry is sparse or not by searching for
it in the index (*without* expanding the index). If a matching sparse
directory index entry is found, no subtrees are added to the cache tree
entry and the entry count is set to 1 (representing the sparse directory
itself). Otherwise, the tree is assumed to not be sparse and its subtrees
are recursively added to the cache tree.
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions
