From: Edmundo Carmona Antoranz Date: Mon, 18 Apr 2022 17:27:21 +0000 (+0200) Subject: rebase: simplify an assignment of options.type in cmd_rebase X-Git-Tag: v2.37.0-rc0~94^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52e1ab8a7692c27c288a15da2604273b401063ac;p=thirdparty%2Fgit.git rebase: simplify an assignment of options.type in cmd_rebase There is an if statement where both if and else have the same assignment of options.type to REBASE_MERGE. Simplify it by getting that assigmnent out of the if. Signed-off-by: Edmundo Carmona Antoranz Signed-off-by: Junio C Hamano --- diff --git a/builtin/rebase.c b/builtin/rebase.c index 36490d06c8..81c8926a56 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1159,11 +1159,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) } else { strbuf_reset(&buf); strbuf_addf(&buf, "%s/interactive", merge_dir()); - if(file_exists(buf.buf)) { - options.type = REBASE_MERGE; + options.type = REBASE_MERGE; + if (file_exists(buf.buf)) options.flags |= REBASE_INTERACTIVE_EXPLICIT; - } else - options.type = REBASE_MERGE; } options.state_dir = merge_dir(); }