summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorNicolas Sebrecht <ni.s@laposte.net>2009-08-07 01:08:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-07 03:52:09 (GMT)
commit46caf5053f0a784911c66530928e6e4361a783f2 (patch)
treecd61da0468c22f8c4c5cee0904d507f70cb7390d /git-am.sh
parent0fcb2caf29d2ff9822cbb3440c5c2c495cf430f0 (diff)
downloadgit-46caf5053f0a784911c66530928e6e4361a783f2.zip
git-46caf5053f0a784911c66530928e6e4361a783f2.tar.gz
git-46caf5053f0a784911c66530928e6e4361a783f2.tar.bz2
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>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index dd60f5d..f719f6e 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
}