Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-08-04 23:28:54 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-04 23:28:54 +0300
commit4dc964691f83543d2e4b508e0354a431dbb528ce (patch)
treec02fdcd3b1eb2a56fdf9fa37f3b2d9b754439290 /builtin
parent5fef3b15dbf609bdb13352d0eb716cd79c8ff017 (diff)
parent74318423259b265cf95112355be254fa21d4a6f9 (diff)
Merge branch 'rs/use-fspathhash'
Code simplification. * rs/use-fspathhash: use fspathhash() everywhere
Diffstat (limited to 'builtin')
-rw-r--r--builtin/sparse-checkout.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index a4bdd7c494..8ba9f13787 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -380,10 +380,7 @@ static void insert_recursive_pattern(struct pattern_list *pl, struct strbuf *pat
struct pattern_entry *e = xmalloc(sizeof(*e));
e->patternlen = path->len;
e->pattern = strbuf_detach(path, NULL);
- hashmap_entry_init(&e->ent,
- ignore_case ?
- strihash(e->pattern) :
- strhash(e->pattern));
+ hashmap_entry_init(&e->ent, fspathhash(e->pattern));
hashmap_add(&pl->recursive_hashmap, &e->ent);
@@ -399,10 +396,7 @@ static void insert_recursive_pattern(struct pattern_list *pl, struct strbuf *pat
e = xmalloc(sizeof(struct pattern_entry));
e->patternlen = newlen;
e->pattern = xstrndup(oldpattern, newlen);
- hashmap_entry_init(&e->ent,
- ignore_case ?
- strihash(e->pattern) :
- strhash(e->pattern));
+ hashmap_entry_init(&e->ent, fspathhash(e->pattern));
if (!hashmap_get_entry(&pl->parent_hashmap, e, ent, NULL))
hashmap_add(&pl->parent_hashmap, &e->ent);