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 <eantoranz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Edmundo Carmona Antoranz committed
Apr 18, 2022 at 19:27 UTC
52e1ab8a7692c27c288a15da2604273b401063ac
1 file changed
+2
-4
builtin/rebase.c
+2
-4
@@ -1159,11 +1159,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1159
} else {
1160
strbuf_reset(&buf);
1161
strbuf_addf(&buf, "%s/interactive", merge_dir());
1162
- if(file_exists(buf.buf)) {
1163
- options.type = REBASE_MERGE;
1162
+ options.type = REBASE_MERGE;
1163
+ if (file_exists(buf.buf))
1164
options.flags |= REBASE_INTERACTIVE_EXPLICIT;
1165
- } else
1166
- options.type = REBASE_MERGE;
1165
}
1166
options.state_dir = merge_dir();
1167
}