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
This commit is contained in:
@ -157,7 +157,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,
|
||||
shift_tree_by(&one->object.oid, &two->object.oid, &shifted,
|
||||
subtree_shift);
|
||||
}
|
||||
if (!oidcmp(&two->object.oid, &shifted))
|
||||
if (oideq(&two->object.oid, &shifted))
|
||||
return two;
|
||||
return lookup_tree(the_repository, &shifted);
|
||||
}
|
||||
@ -180,7 +180,7 @@ static int oid_eq(const struct object_id *a, const struct object_id *b)
|
||||
{
|
||||
if (!a && !b)
|
||||
return 2;
|
||||
return a && b && oidcmp(a, b) == 0;
|
||||
return a && b && oideq(a, b);
|
||||
}
|
||||
|
||||
enum rename_type {
|
||||
|
Reference in New Issue
Block a user