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 коммит произвёл Junio C Hamano
Родитель 584c43567b
Коммит af12fb7b30
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -268,7 +268,11 @@ split_patches () {
msgnum= 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 esac
} }