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>

Johannes Schindelin committed Dec 23, 2017 at 00:55 UTC 9336281c692c0f3b3e1f91ac226fc2a3e0574359
1 file changed +2 -1
git-rebase--interactive.sh
+2 -1
@@ -893,7 +893,8 @@ fi
893 if test t != "$preserve_merges"
894 then
895 git rebase--helper --make-script ${keep_empty:+--keep-empty} \
896 - $revisions ${restrict_revision+^$restrict_revision} >"$todo"
896 + $revisions ${restrict_revision+^$restrict_revision} >"$todo" ||
897 + die "$(gettext "Could not generate todo list")"
898 else
899 format=$(git config --get rebase.instructionFormat)
900 # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse