diff options
author | Edmundo Carmona Antoranz <eantoranz@gmail.com> | 2022-04-18 19:27:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-20 21:42:05 +0200 |
commit | 52e1ab8a7692c27c288a15da2604273b401063ac (patch) | |
tree | d6733fd5bbb58460050d5adbbe79d4d473db7369 /builtin | |
parent | Git 2.35.3 (diff) | |
download | git-52e1ab8a7692c27c288a15da2604273b401063ac.tar.xz git-52e1ab8a7692c27c288a15da2604273b401063ac.zip |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rebase.c | 6 |
1 files changed, 2 insertions, 4 deletions
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(); } |