diff options
author | Pratik Karki <predatoramigo@gmail.com> | 2018-08-08 20:51:21 +0545 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-06 11:55:58 -0700 |
commit | d732a5707855d2cbe5c264b48a8884688a90b95b (patch) | |
tree | 68fb6acb88d0d01311783c50deb70c208c823854 /builtin | |
parent | builtin rebase: support --edit-todo and --show-current-patch (diff) | |
download | tgif-d732a5707855d2cbe5c264b48a8884688a90b95b.tar.xz |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rebase.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 12d34848bd..9238757443 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -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.")); |