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

[PATCH 3/3] git-am: print fair error message when format detection fails

From: Brandon Casey <hidden>
Date: 2016-06-15 22:47:11
Subsystem: the rest · Maintainer: Linus Torvalds

From: Nicolas Sebrecht <redacted>

Avoid git ending with this message:
	"Patch format  is not supported."

With improved error message in the format detection failure case by
Giuseppe Bilotta.

Signed-off-by: Nicolas Sebrecht <redacted>
Signed-off-by: Brandon Casey <redacted>
---
 git-am.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index dd60f5d..f719f6e 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -268,7 +268,11 @@ split_patches () {
 		msgnum=
 		;;
 	*)
-		clean_abort "Patch format $patch_format is not supported."
+		if test -n "$parse_patch" ; then
+			clean_abort "Patch format $patch_format is not supported."
+		else
+			clean_abort "Patch format detection failed."
+		fi
 		;;
 	esac
 }
-- 
1.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help