Thread (12 messages) flat view 12 messages, 6 authors, 2016-06-15

Re: [PATCH] rebase -i: more graceful handling of invalid commands

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:37

Jan Krüger wrote:
quoted hunk ↗ jump to hunk
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a1879e3..fdd8eb6 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -416,7 +416,12 @@ do_next () {
 		;;
 	*)
 		warn "Unknown command: $command $sha1 $rest"
-		die_with_patch $sha1 "Please fix this in the file $TODO."
+		if git rev-parse --verify -q "$sha" >/dev/null
I think you need s/sha/sha1/ here?
+		then
+			die_with_patch $sha1 "Please fix this in the file $TODO."
+		else
+			die "Please fix this in the file $TODO."
+		fi
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help