From e43d2dcce1db256e95b90f89e06d62834a1d361c Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 2 Oct 2018 17:19:21 -0400 Subject: more oideq/hasheq conversions We added faster equality-comparison functions for hashes in 14438c4497 (introduce hasheq() and oideq(), 2018-08-28). A few topics were in-flight at the time, and can now be converted. This covers all spots found by "make coccicheck" in master (the coccicheck results were tweaked by hand for style). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/checkout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin') diff --git a/builtin/checkout.c b/builtin/checkout.c index b30b48767e..902c06702c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -497,7 +497,8 @@ static int skip_merge_working_tree(const struct checkout_opts *opts, * We must do the merge if we are actually moving to a new commit. */ if (!old_branch_info->commit || !new_branch_info->commit || - oidcmp(&old_branch_info->commit->object.oid, &new_branch_info->commit->object.oid)) + !oideq(&old_branch_info->commit->object.oid, + &new_branch_info->commit->object.oid)) return 0; /* -- cgit v1.2.3