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

Re: "Patch is empty. Was is split wrong?"

From
Junio C Hamano <junkio@cox.net>
Date
Mar 17, 2007, 03:54 UTC
Message-ID
<7v3b44v825.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0703161925190.3910@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 9 quoted lines
> My usage of "git-applymbox -u" these days always results in these bogus 
> warnings:
>
> 	Patch is empty.  Was is split wrong?
> 	/home/torvalds/bin/git-applymbox: line 82: stop_here: command not found
>
> but then it applies the patch anyway.
>
> Hmm? I've not looked into it any more yet.

Sounds like two new bugs from the mailinfo series we added last week, primarily 87ab7992 and f0658cf2. I suspect mailinfo thinks there is an empty patch (which may be one bug), and the change to applymbox tries to catch it, but there is no corresponding stop_here shell function defined as in git-am and barfs (which would be another bug).

A fix for the latter bug would be the attached, and that would expose the former bug-suspect which may indicate you indeed have a non-patch in your mailbox (in which case there is no bug) or the updated mailinfo is misidentifying something as a non-patch (which would be a bug).

diff --git a/git-applymbox.sh b/git-applymbox.sh
index 2cbdc7e..c8637a8 100755
--- a/git-applymbox.sh
+++ b/git-applymbox.sh
@@ -79,7 +79,7 @@ do
 		.dotest/msg .dotest/patch <$i >.dotest/info || exit 1
 	    test -s $dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 1
 	    }
 	    git-stripspace < .dotest/msg > .dotest/msg-clean
 	    ;;
Previous: Linus TorvaldsNext: Junio C Hamano
Message 2 of 3 in “"Patch is empty. Was is split wrong?"”
  1. Linus TorvaldsMar 17, 2007
  2. Junio C HamanoMar 17, 2007
  3. Junio C HamanoMar 17, 2007

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.