git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rebase -i: Simplify handling of invalid commands.
@ 2009-11-14  8:11 Greg Price
  0 siblings, 0 replies; only message in thread
From: Greg Price @ 2009-11-14  8:11 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Jan Krüger

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-14  8:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-14  8:11 [PATCH] rebase -i: Simplify handling of invalid commands Greg Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).