summaryrefslogtreecommitdiff
path: root/Documentation/technical/commit-graph.adoc
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-10-26 11:41:46 -0400
committerJunio C Hamano <gitster@pobox.com>2025-10-26 16:30:39 -0700
commit9d6c580d01800defbd9497dbe6a694dc31179dce (patch)
treeaac1a2bc8e85dedb213abaae0dbdbcb1f0a5d9f1 /Documentation/technical/commit-graph.adoc
parentc44beea485f0f2feaf460e2ac87fdd5608d63cf0 (diff)
match_pathname(): reorder prefix-match check
As an optimization, we use fspathncmp() to match a prefix of the pattern that does not contain any wildcards, and then pass the remainder to fnmatch(). If it has matched the whole thing, we can return early. Let's shift this early-return check to before we tweak the pattern and name strings. That will gives us more flexibility with that tweaking. It might also save a few instructions, but I couldn't measure any improvement in doing so (and I wouldn't be surprised if an optimizing compiler could figure that out itself). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/commit-graph.adoc')
0 files changed, 0 insertions, 0 deletions