From: Johannes Schindelin Date: Thu, 27 Mar 2025 11:52:55 +0000 (+0000) Subject: rebase: avoid using the comma operator unnecessarily X-Git-Tag: v2.50.0-rc0~119^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38c696d66b9d3a8f4f3363cc4254dd130723f396;p=thirdparty%2Fgit.git rebase: avoid using the comma operator unnecessarily The comma operator is a somewhat obscure C feature that is often used by mistake and can even cause unintentional code flow. Better use a semicolon instead. Signed-off-by: Johannes Schindelin Acked-by: Phillip Wood Signed-off-by: Junio C Hamano --- diff --git a/builtin/rebase.c b/builtin/rebase.c index d4715ed35d..62bdf7276f 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1843,7 +1843,7 @@ int cmd_rebase(int argc, strbuf_addf(&msg, "%s (start): checkout %s", options.reflog_action, options.onto_name); ropts.oid = &options.onto->object.oid; - ropts.orig_head = &options.orig_head->object.oid, + ropts.orig_head = &options.orig_head->object.oid; ropts.flags = RESET_HEAD_DETACH | RESET_ORIG_HEAD | RESET_HEAD_RUN_POST_CHECKOUT_HOOK; ropts.head_msg = msg.buf;