git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] rebase: do not continue when the todo list generation failed

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 22, 2017, 23:55 UTC
Message-ID
<834ea65b997a052dc47f1bcda5d95865d79a20c9.1513986836.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1513986836.git.johannes.schindelin@gmx.de>

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>
---
 git-rebase--interactive.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index e3f5a0abf3c..b7f95672bd9 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
-- 
2.15.1.windows.2
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 8 in “A couple of sequencer cleanups”
  1. 0/5 A couple of sequencer cleanupsJohannes Schindelin, Dec 22, 2017
  2. 1/5 rebase: do not continue when the todo list generation failedJohannes Schindelin, Dec 22, 2017
  3. 2/5 sequencer: strip bogus LF at end of error messagesJohannes Schindelin, Dec 22, 2017
  4. 3/5 sequencer: remove superfluous conditionalJohannes Schindelin, Dec 22, 2017
  5. 4/5 sequencer: report when noop has an argumentJohannes Schindelin, Dec 22, 2017
  6. 5/5 sequencer: do not invent whitespace when transforming OIDsJohannes Schindelin, Dec 22, 2017
  7. Liam BeguinDec 27, 2017
  8. Junio C HamanoDec 27, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.