builtin rebase: actions require a rebase in progress

This commit prevents actions (such as --continue, --skip) from running
when there is no rebase in progress.

Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pratik Karki 2018-08-08 20:51:21 +05:45 committed by Junio C Hamano
parent 51e9ea6da7
commit d732a57078

View file

@ -577,6 +577,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
usage_with_options(builtin_rebase_usage,
builtin_rebase_options);
if (action != NO_ACTION && !in_progress)
die(_("No rebase in progress?"));
if (action == ACTION_EDIT_TODO && !is_interactive(&options))
die(_("The --edit-todo action can only be used during "
"interactive rebase."));