summaryrefslogtreecommitdiff
path: root/sha1-name.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:57 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:57 -0700
commit769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3 (patch)
tree524c7d9759fb9deae7b82581aa28fc8bc38265f6 /sha1-name.c
parentMerge branch 'tg/rerere-doc-updates' (diff)
parentshow_dirstat: simplify same-content check (diff)
downloadtgif-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.tar.xz
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 'sha1-name.c')
-rw-r--r--sha1-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1-name.c b/sha1-name.c
index fbcd2f78eb..faa60f69e3 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -46,7 +46,7 @@ static void update_candidates(struct disambiguate_state *ds, const struct object
oidcpy(&ds->candidate, current);
ds->candidate_exists = 1;
return;
- } else if (!oidcmp(&ds->candidate, current)) {
+ } else if (oideq(&ds->candidate, current)) {
/* the same as what we already have seen */
return;
}