aboutsummaryrefslogtreecommitdiff
path: root/gitweb/static
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2026-03-26 15:14:53 +0000
committerJunio C Hamano <gitster@pobox.com>2026-03-26 09:38:07 -0700
commit3f20c21a1ceeb796e121147a53ba10d28041b1fe (patch)
tree998e84a94c0d1480e6be6a4cbb0f336b8cdecf3d /gitweb/static
parent7be182045a6a113b118982fc81296d5b9746779e (diff)
downloadgit-3f20c21a1ceeb796e121147a53ba10d28041b1fe.tar.xz
path-walk: support wildcard pathspecs for blob filtering
Previously, walk_objects_by_path() silently ignored pathspecs containing wildcards or magic by clearing them. This caused all blobs to be downloaded regardless of the given pathspec. Wildcard pathspecs like "d/file.*.txt" are useful for narrowing which blobs to process (e.g., during 'git backfill'). Support wildcard pathspecs by making two changes: 1. Add an 'exact_pathspecs' flag to path_walk_context. When the pathspec has no wildcards or magic, set this flag and use the existing fast-path prefix matching in add_tree_entries(). When wildcards are present, skip that block since prefix matching cannot handle glob patterns. 2. Add a match_pathspec() check in walk_path() to filter out blobs whose full path does not match the pathspec. This provides the actual blob-level filtering for wildcard pathspecs. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static')
0 files changed, 0 insertions, 0 deletions