diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-07-14 13:12:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-14 13:42:49 -0700 |
commit | 523506df51e2e13c8c354dff1eea3378bac8dec8 (patch) | |
tree | 0272f71f7551fcfde07105a07cb093e2607111fd /Documentation/git-interpret-trailers.txt | |
parent | unpack-trees: rename unpack_nondirectories() (diff) | |
download | tgif-523506df51e2e13c8c354dff1eea3378bac8dec8.tar.xz |
unpack-trees: unpack sparse directory entries
During unpack_callback(), index entries are compared against tree
entries. These are matched according to names and types. One goal is to
decide if we should recurse into subtrees or simply operate on one index
entry.
In the case of a sparse-directory entry, we do not want to recurse into
that subtree and instead simply compare the trees. In some cases, we
might want to perform a merge operation on the entry, such as during
'git checkout <commit>' which wants to replace a sparse tree entry with
the tree for that path at the target commit. We extend the logic within
unpack_single_entry() to create a sparse-directory entry in this case,
and then that is sent to call_unpack_fn().
There are some subtleties in this process. For instance, we need to
update find_cache_entry() to allow finding a sparse-directory entry that
exactly matches a given path. Use the new helper method
sparse_dir_matches_path() for this. We also need to ignore conflict
markers in the case that the entries correspond to directories and we
already have a sparse directory entry.
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 'Documentation/git-interpret-trailers.txt')
0 files changed, 0 insertions, 0 deletions