From: Nicolas Sebrecht Date: Fri, 7 Aug 2009 01:08:13 +0000 (-0500) Subject: git-am: print fair error message when format detection fails X-Git-Tag: v1.6.5-rc0~82^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=46caf5053f0a784911c66530928e6e4361a783f2;p=git.git git-am: print fair error message when format detection fails 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 Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- diff --git a/git-am.sh b/git-am.sh index dd60f5d9c..f719f6e65 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 }