diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-07-14 13:12:35 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-14 13:42:49 -0700 |
commit | 9eb00af5627f1a04ca083128085ca6774fce0524 (patch) | |
tree | cf2dae91e65f37c752a85d3d26910c75d477f6ad /pathspec.c | |
parent | dir.c: accept a directory as part of cone-mode patterns (diff) | |
download | tgif-9eb00af5627f1a04ca083128085ca6774fce0524.tar.xz |
diff-lib: handle index diffs with sparse dirs
While comparing an index to a tree, we may see a sparse directory entry.
In this case, we should compare that portion of the tree to the tree
represented by that entry. This could include a new tree which needs to
be expanded to a full list of added files. It could also include an
existing tree, in which case all of the changes inside are important to
describe, including the modifications, additions, and deletions. Note
that the case where the tree has a path and the index does not remains
identical to before: the lack of a cache entry is the same with a sparse
index.
Use diff_tree_oid() appropriately to compute the diff.
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pathspec.c')
0 files changed, 0 insertions, 0 deletions