Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15
DORMANTno replies

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

From: Nicolas Sebrecht <hidden>
Date: 2016-06-15 22:47:03
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Nicolas Sebrecht <redacted>
---
 git-am.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index d64d997..ca73c88 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -254,7 +254,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 "Format patch detection failed."
+		fi
 		;;
 	esac
 }
-- 
1.6.4.rc0.121.g2937a.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help