diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-17 22:53:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-17 22:53:57 +0200 |
commit | 769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3 (patch) | |
tree | 524c7d9759fb9deae7b82581aa28fc8bc38265f6 /pack-objects.c | |
parent | Merge branch 'tg/rerere-doc-updates' (diff) | |
parent | show_dirstat: simplify same-content check (diff) | |
download | git-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.tar.xz git-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.zip |
Merge branch 'jk/cocci'
spatch transformation to replace boolean uses of !hashcmp() to
newly introduced oideq() is added, and applied, to regain
performance lost due to support of multiple hash algorithms.
* jk/cocci:
show_dirstat: simplify same-content check
read-cache: use oideq() in ce_compare functions
convert hashmap comparison functions to oideq()
convert "hashcmp() != 0" to "!hasheq()"
convert "oidcmp() != 0" to "!oideq()"
convert "hashcmp() == 0" to hasheq()
convert "oidcmp() == 0" to oideq()
introduce hasheq() and oideq()
coccinelle: use <...> for function exclusion
Diffstat (limited to 'pack-objects.c')
-rw-r--r-- | pack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-objects.c b/pack-objects.c index 7f7b7dddf6..7e624c30eb 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -16,7 +16,7 @@ static uint32_t locate_object_entry_hash(struct packing_data *pdata, while (pdata->index[i] > 0) { uint32_t pos = pdata->index[i] - 1; - if (!hashcmp(sha1, pdata->objects[pos].idx.oid.hash)) { + if (hasheq(sha1, pdata->objects[pos].idx.oid.hash)) { *found = 1; return i; } |