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

[PATCH] rebase -i: Simplify handling of invalid commands.

From
Greg Price <price@mit.edu>
Date
Nov 14, 2009, 08:11 UTC
Message-ID
<20091114081115.GM30538@dr-wily.mit.edu>

A few weeks ago there was a bug report that some invalid commands produced confusing error messages. The fix could have made things simpler. There's no need for die_with_patch in this case, because its purpose is to tell rerere and a future rebase --continue about a commit that we just attempted, and we didn't attempt any commit. So just use a plain "die" unconditionally.

Signed-off-by: Greg Price <price@mit.edu>
---
 git-rebase--interactive.sh |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 53ad248..6d0ca7b 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -416,12 +416,7 @@ do_next () {
 		;;
 	*)
 		warn "Unknown command: $command $sha1 $rest"
-		if git rev-parse --verify -q "$sha1" >/dev/null
-		then
-			die_with_patch $sha1 "Please fix this in the file $TODO."
-		else
-			die "Please fix this in the file $TODO."
-		fi
+		die "Please fix this in the file $TODO."
 		;;
 	esac
 	test -s "$TODO" && return
-- 
1.6.5.2.27.g906c6.dirty
Message 1 of 1 in “rebase -i: Simplify handling of invalid commands.”
  1. rebase -i: Simplify handling of invalid commands.Greg Price, Nov 14, 2009

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.