aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-12-23 00:55:38 +0100
committerJunio C Hamano <gitster@pobox.com>2017-12-27 12:33:38 -0800
commit9336281c692c0f3b3e1f91ac226fc2a3e0574359 (patch)
treedf9d0d39eb88f7ae49d3cf848eeeef3994299cc6
parent29533fb16899725af9306e0c3b83da8954c0e48a (diff)
downloadgit-9336281c692c0f3b3e1f91ac226fc2a3e0574359.tar.gz
git-9336281c692c0f3b3e1f91ac226fc2a3e0574359.tar.xz
rebase: do not continue when the todo list generation failed
This is a *really* long-standing bug. As a matter of fact, this bug has been with us from the very beginning of `rebase -i`: 1b1dce4bae7 (Teach rebase an interactive mode, 2007-06-25), where the output of `rev-list` was piped to `sed` (and any failure of the `rev-list` process would go completely undetected). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--git-rebase--interactive.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index e3f5a0abf..b7f95672b 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -893,7 +893,8 @@ fi
if test t != "$preserve_merges"
then
git rebase--helper --make-script ${keep_empty:+--keep-empty} \
- $revisions ${restrict_revision+^$restrict_revision} >"$todo"
+ $revisions ${restrict_revision+^$restrict_revision} >"$todo" ||
+ die "$(gettext "Could not generate todo list")"
else
format=$(git config --get rebase.instructionFormat)
# the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse