Denton Liu <liu.den...@gmail.com> 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.

Reply via email to