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
} else if (0 <= oid_array_lookup(&good_revs, mb)) {
continue;
@ -989,7 +989,7 @@ int bisect_next_all(const char *prefix, int no_checkout)
@@ -989,7 +989,7 @@ int bisect_next_all(const char *prefix, int no_checkout)
bisect_rev = &revs.commits->item->object.oid;
if (!oidcmp(bisect_rev, current_bad_oid)) {
if (oideq(bisect_rev, current_bad_oid)) {
exit_if_skipped_commits(tried, current_bad_oid);
printf("%s is the first %s commit\n", oid_to_hex(bisect_rev),
@ -343,7 +343,7 @@ static int edit_and_replace(const char *object_ref, int force, int raw)
@@ -343,7 +343,7 @@ static int edit_and_replace(const char *object_ref, int force, int raw)
}
free(tmpfile);
if (!oidcmp(&old_oid, &new_oid))
if (oideq(&old_oid, &new_oid))
return error(_("new object is the same as the old one: '%s'"), oid_to_hex(&old_oid));
@ -414,7 +414,7 @@ static int check_one_mergetag(struct commit *commit,
@@ -414,7 +414,7 @@ static int check_one_mergetag(struct commit *commit,
if (get_oid(mergetag_data->argv[i], &oid) < 0)
return error(_("not a valid object name: '%s'"),
mergetag_data->argv[i]);
if (!oidcmp(&tag->tagged->oid, &oid))
if (oideq(&tag->tagged->oid, &oid))
return 0; /* found */
}
@ -474,7 +474,7 @@ static int create_graft(int argc, const char **argv, int force, int gentle)
@@ -474,7 +474,7 @@ static int create_graft(int argc, const char **argv, int force, int gentle)
strbuf_release(&buf);
if (!oidcmp(&old_oid, &new_oid)) {
if (oideq(&old_oid, &new_oid)) {
if (gentle) {
warning(_("graft for '%s' unnecessary"), oid_to_hex(&old_oid));
@ -157,7 +157,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,
@@ -157,7 +157,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,