Skip to content

Commit 46caf50

Browse files
nicolas33gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0fcb2ca commit 46caf50

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-am.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ split_patches () {
268268
msgnum=
269269
;;
270270
*)
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
272276
;;
273277
esac
274278
}

0 commit comments

Comments
 (0)