summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-09-17 20:53:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-17 20:53:57 (GMT)
commit769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3 (patch)
tree524c7d9759fb9deae7b82581aa28fc8bc38265f6 /builtin/merge.c
parentd88949d86eddb62acbc85c16c97587db043d05b1 (diff)
parentd9f62dfa0ddc31bdad93054acca9fd42ca781f7f (diff)
downloadgit-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.zip
git-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.tar.gz
git-769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3.tar.bz2
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/merge.c')
-rw-r--r--builtin/merge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 7a8e3e2..e331ca6 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1190,7 +1190,7 @@ static int merging_a_throwaway_tag(struct commit *commit)
tag_ref = xstrfmt("refs/tags/%s",
((struct tag *)merge_remote_util(commit)->obj)->tag);
if (!read_ref(tag_ref, &oid) &&
- !oidcmp(&oid, &merge_remote_util(commit)->obj->oid))
+ oideq(&oid, &merge_remote_util(commit)->obj->oid))
is_throwaway_tag = 0;
else
is_throwaway_tag = 1;
@@ -1449,7 +1449,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
goto done;
} else if (fast_forward != FF_NO && !remoteheads->next &&
!common->next &&
- !oidcmp(&common->item->object.oid, &head_commit->object.oid)) {
+ oideq(&common->item->object.oid, &head_commit->object.oid)) {
/* Again the most common case of merging one remote. */
struct strbuf msg = STRBUF_INIT;
struct commit *commit;
@@ -1522,7 +1522,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* HEAD^^" would be missed.
*/
common_one = get_merge_bases(head_commit, j->item);
- if (oidcmp(&common_one->item->object.oid, &j->item->object.oid)) {
+ if (!oideq(&common_one->item->object.oid, &j->item->object.oid)) {
up_to_date = 0;
break;
}