From: Junio C Hamano Date: Sun, 24 Mar 2019 13:37:49 GMT Subject: Re: [PATCH 1/3] rebase: teach rebase --keep-base Message-ID: In-Reply-To: Denton Liu writes: > if (strstr(options.onto_name, "...")) { > if (get_oid_mb(options.onto_name, &merge_base) < 0) > + if (keep_base) > + die(_("'%s': need exactly one merge base with branch"), > + options.upstream_name); > + else > die(_("'%s': need exactly one merge base"), > options.onto_name); If you turn a single statement body into if/else, have {} around the body of the outer if, i.e. if (get_oid_mb(...) < 0) { if (keep_base) die(_("'%s': need exactly one merge base with branch"), options.upstream_name); else die(_("'%s': need exactly one merge base"), options.onto_name); } Otherwise -Werror=danglng-else will stop compilation. Thanks.