diff mbox series

[v4,02/34] builtin rebase: use oideq()

Message ID 20190416093341.17079-3-pclouds@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v4,01/34] builtin rebase: use FREE_AND_NULL | expand

Commit Message

Duy Nguyen April 16, 2019, 9:33 a.m. UTC
From: SZEDER Gábor <szeder.dev@gmail.com>

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>
---
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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",