am: format is in $patch_format, not parse_patch

The error message given when the patch format was not recognized was wrong, since the variable checked was $parse_patch rather than $patch_format. Fix by checking the non-emptyness of the correct variable. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Giuseppe Bilotta committed Aug 29, 2011 at 17:22 UTC dff4b0ef30cd3f06e1f2383ce09f81b8da94d5b3
1 file changed +2 -1
git-am.sh
+2 -1
@@ -268,7 +268,8 @@ split_patches () {
268 msgnum=
269 ;;
270 *)
271 - if test -n "$parse_patch" ; then
271 + if test -n "$patch_format"
272 + then
273 clean_abort "Patch format $patch_format is not supported."
274 else
275 clean_abort "Patch format detection failed."