[PATCH 3/3] git-am: print fair error message when format detection fails
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Aug 7, 2009, 01:08 UTC
- Message-ID
- <COrzR9ThNBy5SQ7chsXyUBcRjlQZ5mxjnQCmJLjctoPOo1ieWRAzuS-B2EZLAe3of_HNxTmt-ck@cipher.nrlssc.navy.mil>
- In-Reply-To
- <COrzR9ThNBy5SQ7chsXyUB30jVGIijxZQ3LI9L_y7Ab5vWcDcy_HolvjjuHTC7DHI9ntV-eR_v0@cipher.nrlssc.navy.mil>
From: Nicolas Sebrecht <ni.s@laposte.net>
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> --- git-am.sh | 6 +++++- 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 }
-- 1.6.4