:(icase)-aware string compare */
| 930 | |
| 931 | /* :(icase)-aware string compare */ |
| 932 | static 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 | |
| 947 | static int match_dir_prefix(const struct pathspec_item *item, |
| 948 | const char *base, |
no test coverage detected