summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2021-11-29 15:52:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-29 20:51:26 (GMT)
commit4d1cfc1351ffec47bba1318e9cd1ed13c5182951 (patch)
treeb43e42dcb8810e21933fda314e39f98da4db75b9 /t/perf
parent20ec2d034cda1afef15a4dcc6e275d7a69413510 (diff)
downloadgit-4d1cfc1351ffec47bba1318e9cd1ed13c5182951.zip
git-4d1cfc1351ffec47bba1318e9cd1ed13c5182951.tar.gz
git-4d1cfc1351ffec47bba1318e9cd1ed13c5182951.tar.bz2
reset: make --mixed sparse-aware
Remove the `ensure_full_index` guard on `read_from_tree` and update `git reset --mixed` to ensure it can use sparse directory index entries wherever possible. Sparse directory entries are reset using `diff_tree_oid`, which requires `change` and `add_remove` functions to process the internal contents of the sparse directory. The `recursive` diff option handles cases in which `reset --mixed` must diff/merge files that are nested multiple levels deep in a sparse directory. The use of pathspecs with `git reset --mixed` introduces scenarios in which internal contents of sparse directories may be matched by the pathspec. In order to reset *all* files in the repo that may match the pathspec, the following conditions on the pathspec require index expansion before performing the reset: * "magic" pathspecs * wildcard pathspecs that do not match only in-cone files or entire sparse directories * literal pathspecs matching something outside the sparse checkout definition 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 't/perf')
0 files changed, 0 insertions, 0 deletions