summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2025-05-21 16:29:15 -0700
committerJunio C Hamano <gitster@pobox.com>2025-05-22 14:20:11 -0700
commit6e4fb00156a3651ff84d19d2a16d69e87d29b68b (patch)
tree3d9c6bf415d6eb9500f4174d4a888b95aa6a6032 /git-gui/lib/commit.tcl
parent8613c2bb6cd16ef530dc5dd74d3b818a1ccbf1c0 (diff)
pathspec: add match_leading_pathspec variant
The do_match_pathspec() function has the DO_MATCH_LEADING_PATHSPEC option to allow pathspecs to match when matching "src" against a pathspec like "src/path/...". This support is not exposed by match_pathspec, and the internal flags to do_match_pathspec are not exposed outside of dir.c The upcoming support for pathspecs in git diff --no-index need the LEADING matching behavior when iterating down through a directory with readdir. We could try to expose the match_pathspec_with_flags to the public API. However, DO_MATCH_EXCLUDES really shouldn't be public, and its a bit weird to only have a few of the flags become public. Instead, add match_leading_pathspec() as a function which sets both DO_MATCH_DIRECTORY and DO_MATCH_LEADING_PATHSPEC when is_dir is true. This will be used in a following change to support pathspec matching in git diff --no-index. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions