git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-am: print fair error message when format detection fails

From
NSNicolas Sebrecht <ni.s@laposte.net>
Date
Jul 14, 2009, 06:39 UTC
Message-ID
<beef9dfceed12f279bc27fbecf82118761cada49.1247553436.git.ni.s@laposte.net>
Avoid git ending with this message:
	"Patch format  is not supported."
Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
---
 git-am.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index d64d997..ca73c88 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -254,7 +254,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 "Format patch detection failed."
+		fi
 		;;
 	esac
 }
-- 
1.6.4.rc0.121.g2937a.dirty
Next: Giuseppe Bilotta
Message 1 of 2 in “git-am: print fair error message when format detection fails”
  1. git-am: print fair error message when format detection failsNicolas Sebrecht, Jul 14, 2009
  2. Giuseppe BilottaJul 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.