diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-01 13:44:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-02 03:04:59 +0100 |
commit | b17ca8f94deb6e6c83ae705dcf712bf38a03ee4e (patch) | |
tree | fdb5fd5345f90a7b640a740e692c49550a4386f2 /builtin/rebase.c | |
parent | Merge branch 'js/rebase-i-shortopt' (diff) | |
download | git-b17ca8f94deb6e6c83ae705dcf712bf38a03ee4e.tar.xz git-b17ca8f94deb6e6c83ae705dcf712bf38a03ee4e.zip |
rebase: apply cocci patch
Favor oideq() over !oidcmp() when checking for equality.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | builtin/rebase.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index d8e4e0e3a9..0ee06aa363 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -689,7 +689,7 @@ static int can_fast_forward(struct commit *onto, struct object_id *head_oid, merge_bases = get_merge_bases(onto, head); if (merge_bases && !merge_bases->next) { oidcpy(merge_base, &merge_bases->item->object.oid); - res = !oidcmp(merge_base, &onto->object.oid); + res = oideq(merge_base, &onto->object.oid); } else { oidcpy(merge_base, &null_oid); res = 0; |