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>
Nicolas Sebrecht committed
Aug 6, 2009 at 20:08 UTC
af12fb7b3048c5bdd2e90885a6736ebc29d84f01
1 file changed
+5
-1
git-am.sh
+5
-1
@@ -268,7 +268,11 @@ split_patches () {
268
msgnum=
269
;;
270
*)
271
- clean_abort "Patch format $patch_format is not supported."
271
+ if test -n "$parse_patch" ; then
272
+ clean_abort "Patch format $patch_format is not supported."
273
+ else
274
+ clean_abort "Patch format detection failed."
275
+ fi
276
;;
277
esac
278
}