diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-17 13:53:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-17 13:53:57 -0700 |
commit | 769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3 (patch) | |
tree | 524c7d9759fb9deae7b82581aa28fc8bc38265f6 /builtin/receive-pack.c | |
parent | Merge branch 'tg/rerere-doc-updates' (diff) | |
parent | show_dirstat: simplify same-content check (diff) | |
download | tgif-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 'builtin/receive-pack.c')
-rw-r--r-- | builtin/receive-pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 35a3fcfbd9..a3bb13af10 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1223,8 +1223,8 @@ static void check_aliased_update(struct command *cmd, struct string_list *list) dst_cmd = (struct command *) item->util; - if (!oidcmp(&cmd->old_oid, &dst_cmd->old_oid) && - !oidcmp(&cmd->new_oid, &dst_cmd->new_oid)) + if (oideq(&cmd->old_oid, &dst_cmd->old_oid) && + oideq(&cmd->new_oid, &dst_cmd->new_oid)) return; dst_cmd->skip_update = 1; |