Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-09-17 23:53:57 +0300
committerJunio C Hamano <gitster@pobox.com>2018-09-17 23:53:57 +0300
commit769af0fd9ea0b4de172b51ae4b9ea41b57c02fd3 (patch)
tree524c7d9759fb9deae7b82581aa28fc8bc38265f6 /builtin/fmt-merge-msg.c
parentd88949d86eddb62acbc85c16c97587db043d05b1 (diff)
parentd9f62dfa0ddc31bdad93054acca9fd42ca781f7f (diff)
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/fmt-merge-msg.c')
-rw-r--r--builtin/fmt-merge-msg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index e5668f27d8..59a40342b6 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -79,9 +79,9 @@ static struct merge_parent *find_merge_parent(struct merge_parents *table,
{
int i;
for (i = 0; i < table->nr; i++) {
- if (given && oidcmp(&table->item[i].given, given))
+ if (given && !oideq(&table->item[i].given, given))
continue;
- if (commit && oidcmp(&table->item[i].commit, commit))
+ if (commit && !oideq(&table->item[i].commit, commit))
continue;
return &table->item[i];
}
@@ -583,7 +583,7 @@ static void find_merge_parents(struct merge_parents *result,
while (parents) {
struct commit *cmit = pop_commit(&parents);
for (i = 0; i < result->nr; i++)
- if (!oidcmp(&result->item[i].commit, &cmit->object.oid))
+ if (oideq(&result->item[i].commit, &cmit->object.oid))
result->item[i].used = 1;
}