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>
SZEDER Gábor committed
Apr 6, 2019 at 18:34 UTC
d2c4e6292a29b9c59a11aa342ea168d4accf0ac2
1 file changed
+1
-1
builtin/rebase.c
+1
-1
@@ -1792,7 +1792,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1792
* we just fast-forwarded.
1793
*/
1794
strbuf_reset(&msg);
1795
- if (!oidcmp(&merge_base, &options.orig_head)) {
1795
+ if (oideq(&merge_base, &options.orig_head)) {
1796
printf(_("Fast-forwarded %s to %s.\n"),
1797
branch_name, options.onto_name);
1798
strbuf_addf(&msg, "rebase finished: %s onto %s",