diff options
author | 2021-08-04 13:28:54 -0700 | |
---|---|---|
committer | 2021-08-04 13:28:54 -0700 | |
commit | 4dc964691f83543d2e4b508e0354a431dbb528ce (patch) | |
tree | c02fdcd3b1eb2a56fdf9fa37f3b2d9b754439290 /builtin | |
parent | Merge branch 'pb/merge-autostash-more' (diff) | |
parent | use fspathhash() everywhere (diff) | |
download | tgif-4dc964691f83543d2e4b508e0354a431dbb528ce.tar.xz |
Merge branch 'rs/use-fspathhash'
Code simplification.
* rs/use-fspathhash:
use fspathhash() everywhere
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/sparse-checkout.c | 10 |
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); |