diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-28 13:17:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-28 13:17:57 -0700 |
commit | e5cc59c77c875aeda93a3cdfe70c8254164324ab (patch) | |
tree | 2299898410f357bfe17235877d70fdd1147c0ac7 /dir.c | |
parent | 14793a4e37341950dc338ea7a7dbc05db37f5e9e (diff) | |
parent | 92d8ed8ac101d62183d51f280b90efb1de1bda5c (diff) | |
download | git-e5cc59c77c875aeda93a3cdfe70c8254164324ab.tar.gz |
Merge branch 'ew/many-alternate-optim'
Optimization for repositories with many alternate object store.
* ew/many-alternate-optim:
oidtree: a crit-bit tree for odb_loose_cache
oidcpy_with_padding: constify `src' arg
make object_directory.loose_objects_subdir_seen a bitmap
avoid strlen via strbuf_addstr in link_alt_odb_entry
speed up alt_odb_usable() with many alternates
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -78,11 +78,21 @@ int fspathcmp(const char *a, const char *b) return ignore_case ? strcasecmp(a, b) : strcmp(a, b); } +int fspatheq(const char *a, const char *b) +{ + return !fspathcmp(a, b); +} + int fspathncmp(const char *a, const char *b, size_t count) { return ignore_case ? strncasecmp(a, b, count) : strncmp(a, b, count); } +unsigned int fspathhash(const char *str) +{ + return ignore_case ? strihash(str) : strhash(str); +} + int git_fnmatch(const struct pathspec_item *item, const char *pattern, const char *string, int prefix) |