summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-07-14 13:12:34 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-14 13:42:49 -0700
commit69bdbdb0ee25bd64bd3ad2fe241d434442e96f75 (patch)
tree7f2128154a7188a619d56a6d9ae9bd2c5a81b4a1 /attr.c
parentunpack-trees: unpack sparse directory entries (diff)
downloadtgif-69bdbdb0ee25bd64bd3ad2fe241d434442e96f75.tar.xz
dir.c: accept a directory as part of cone-mode patterns
When we have sparse directory entries in the index, we want to compare that directory against sparse-checkout patterns. Those pattern matching algorithms are built expecting a file path, not a directory path. This is especially important in the "cone mode" patterns which will match files that exist within the "parent directories" as well as the recursive directory matches. If path_matches_pattern_list() is given a directory, we can add a fake filename ("-") to the directory and get the same results as before, assuming we are in cone mode. Since sparse index requires cone mode patterns, this is an acceptable assumption. 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 'attr.c')
0 files changed, 0 insertions, 0 deletions