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 <ni.s@laposte.net>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicolas Sebrecht 2009-08-06 20:08:13 -05:00 committed by Junio C Hamano
parent 0fcb2caf29
commit 46caf5053f

View file

@ -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
}