{"thread":{"id":"7283","subject":"\"Patch is empty. Was is split wrong?\"","startedAt":"2007-03-17T02:26:57Z","lastAt":"2007-03-17T04:19:42Z","messageCount":3,"participants":["Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37297","messageId":"Pine.LNX.4.64.0703161925190.3910@woody.linux-foundation.org","threadId":"7283","inReplyTo":null,"subject":"\"Patch is empty. Was is split wrong?\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-03-17T02:26:57Z","receivedAt":"2007-03-17T02:26:57Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nMy usage of \"git-applymbox -u\" these days always results in these bogus \nwarnings:\n\n\tPatch is empty.  Was is split wrong?\n\t/home/torvalds/bin/git-applymbox: line 82: stop_here: command not found\n\nbut then it applies the patch anyway.\n\nHmm? I've not looked into it any more yet.\n\n\t\tLinus\n"},{"id":"37299","messageId":"7v3b44v825.fsf@assigned-by-dhcp.cox.net","threadId":"7283","inReplyTo":"Pine.LNX.4.64.0703161925190.3910@woody.linux-foundation.org","subject":"Re: \"Patch is empty. Was is split wrong?\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-17T03:54:26Z","receivedAt":"2007-03-17T03:54:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> My usage of \"git-applymbox -u\" these days always results in these bogus \n> warnings:\n>\n> \tPatch is empty.  Was is split wrong?\n> \t/home/torvalds/bin/git-applymbox: line 82: stop_here: command not found\n>\n> but then it applies the patch anyway.\n>\n> Hmm? I've not looked into it any more yet.\n\nSounds like two new bugs from the mailinfo series we added last\nweek, primarily 87ab7992 and f0658cf2.  I suspect mailinfo\nthinks there is an empty patch (which may be one bug), and the\nchange to applymbox tries to catch it, but there is no\ncorresponding stop_here shell function defined as in git-am and\nbarfs (which would be another bug).\n\nA fix for the latter bug would be the attached, and that would\nexpose the former bug-suspect which may indicate you indeed have\na non-patch in your mailbox (in which case there is no bug) or\nthe updated mailinfo is misidentifying something as a non-patch\n(which would be a bug).\n\n\n\ndiff --git a/git-applymbox.sh b/git-applymbox.sh\nindex 2cbdc7e..c8637a8 100755\n--- a/git-applymbox.sh\n+++ b/git-applymbox.sh\n@@ -79,7 +79,7 @@ do\n \t\t.dotest/msg .dotest/patch <$i >.dotest/info || exit 1\n \t    test -s $dotest/patch || {\n \t\techo \"Patch is empty.  Was is split wrong?\"\n-\t\tstop_here $this\n+\t\texit 1\n \t    }\n \t    git-stripspace < .dotest/msg > .dotest/msg-clean\n \t    ;;\n"},{"id":"37300","messageId":"7vy7lwtsbl.fsf@assigned-by-dhcp.cox.net","threadId":"7283","inReplyTo":"7v3b44v825.fsf@assigned-by-dhcp.cox.net","subject":"Re: \"Patch is empty. Was is split wrong?\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-17T04:19:42Z","receivedAt":"2007-03-17T04:19:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>\n>> My usage of \"git-applymbox -u\" these days always results in these bogus \n>> warnings:\n>>\n>> \tPatch is empty.  Was is split wrong?\n>> \t/home/torvalds/bin/git-applymbox: line 82: stop_here: command not found\n>>\n>> but then it applies the patch anyway.\n>>\n>> Hmm? I've not looked into it any more yet.\n>\n> Sounds like two new bugs from the mailinfo series we added last\n> week, primarily 87ab7992 and f0658cf2.\n\nSheesh.  Sorry, for a false patch.  Here is a fix (will do this\non 'master' tonight).\n\ndiff --git a/git-applymbox.sh b/git-applymbox.sh\nindex 2cbdc7e..3efd6a7 100755\n--- a/git-applymbox.sh\n+++ b/git-applymbox.sh\n@@ -77,9 +77,9 @@ do\n     *)\n \t    git-mailinfo $keep_subject $utf8 \\\n \t\t.dotest/msg .dotest/patch <$i >.dotest/info || exit 1\n-\t    test -s $dotest/patch || {\n+\t    test -s .dotest/patch || {\n \t\techo \"Patch is empty.  Was is split wrong?\"\n-\t\tstop_here $this\n+\t\texit 1\n \t    }\n \t    git-stripspace < .dotest/msg > .dotest/msg-clean\n \t    ;;\n"}]}