MCPcopy Create free account
hub / github.com/git/git / basecmp

Function basecmp

tree-walk.c:932–945  ·  view source on GitHub ↗

:(icase)-aware string compare */

Source from the content-addressed store, hash-verified

930
931/* :(icase)-aware string compare */
932static int basecmp(const struct pathspec_item *item,
933 const char *base, const char *match, int len)
934{
935 if (item->magic & PATHSPEC_ICASE) {
936 int ret, n = len > item->prefix ? item->prefix : len;
937 ret = strncmp(base, match, n);
938 if (ret)
939 return ret;
940 base += n;
941 match += n;
942 len -= n;
943 }
944 return ps_strncmp(item, base, match, len);
945}
946
947static int match_dir_prefix(const struct pathspec_item *item,
948 const char *base,

Callers 3

match_dir_prefixFunction · 0.85
match_wildcard_baseFunction · 0.85
do_matchFunction · 0.85

Calls 1

ps_strncmpFunction · 0.85

Tested by

no test coverage detected