summaryrefslogtreecommitdiff
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2019-04-06 18:34:22 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-08 17:26:32 +0900
commitd2c4e6292a29b9c59a11aa342ea168d4accf0ac2 (patch)
tree08f4b14625603ba904494c3df033c38c3190109b /builtin/rebase.c
parentbuiltin rebase: use FREE_AND_NULL (diff)
downloadtgif-d2c4e6292a29b9c59a11aa342ea168d4accf0ac2.tar.xz
builtin rebase: use oideq()
Use oideq() instead of !oidcmp(), as it is more idiomatic, and might give the compiler more opportunities to optimize. Patch generated with 'contrib/coccinelle/free.cocci' and Coccinelle v1.0.7 (previous Coccinelle versions don't notice this). Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r--builtin/rebase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 868bcd1446..c064909329 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1792,7 +1792,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
* we just fast-forwarded.
*/
strbuf_reset(&msg);
- if (!oidcmp(&merge_base, &options.orig_head)) {
+ if (oideq(&merge_base, &options.orig_head)) {
printf(_("Fast-forwarded %s to %s.\n"),
branch_name, options.onto_name);
strbuf_addf(&msg, "rebase finished: %s onto %s",