aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2014-05-19 18:05:20 -0400
committerJunio C Hamano <gitster@pobox.com>2014-05-19 15:36:24 -0700
commite4244eb3957d478ca05b42d8b56aadb9ab2bc7ae (patch)
tree67a4bb7b8c1b932542396f2501a7c32809ca78b9 /git-rebase--interactive.sh
parentac1998deddbb5b59c80f2a3d902e18b31fe9cc50 (diff)
downloadgit-e4244eb3957d478ca05b42d8b56aadb9ab2bc7ae.tar.gz
git-e4244eb3957d478ca05b42d8b56aadb9ab2bc7ae.tar.xz
rebase -i: handle "Nothing to do" case with autostash
When a user invokes $ git rebase -i @~3 with dirty files and rebase.autostash turned on, and exits the $EDITOR with an empty buffer, the autostash fails to apply. Although the primary focus of rr/rebase-autostash was to get the git-rebase--backend.sh scripts to return control to git-rebase.sh, it missed this case in git-rebase--interactive.sh. Since this case is unlike the other cases which return control for housekeeping, assign it a special return status and handle that return value explicitly in git-rebase.sh. Reported-by: Karen Etheridge <ether@cpan.org> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index f953d8d22..85f0e93ee 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -970,14 +970,14 @@ fi
has_action "$todo" ||
- die_abort "Nothing to do"
+ return 2
cp "$todo" "$todo".backup
git_sequence_editor "$todo" ||
die_abort "Could not execute editor"
has_action "$todo" ||
- die_abort "Nothing to do"
+ return 2
test -d "$rewritten" || test -n "$force_rebase" || skip_unnecessary_picks