{"thread":{"id":"1011","subject":"'dotest' fails, patch(1) succeeds","startedAt":"2005-06-23T07:37:37Z","lastAt":"2005-06-23T16:22:44Z","messageCount":2,"participants":["Jeff Garzik","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"5174","messageId":"42BA66C1.30400@pobox.com","threadId":"1011","inReplyTo":null,"subject":"'dotest' fails, patch(1) succeeds","fromName":"Jeff Garzik","fromEmail":"jgarzik@pobox.com","sentAt":"2005-06-23T07:37:37Z","receivedAt":"2005-06-23T07:37:37Z","isPatch":false,"sender":{"key":"jgarzik@pobox.com","avatar":null},"body":"\nTrying to use git-tools' \"dotest\" script to merge an mbox into a kernel \ngit repo failed, but patch(1) was OK with it:\n\n\t[jgarzik@pretzel netdev-2.6]$ dotest /g/tmp/mbox\n\n\tApplying 'e1000: fix spinlock bug'\n\n\tfatal: corrupt patch at line 10\n\t[jgarzik@pretzel netdev-2.6]$ patch -sp1  < /g/tmp/mbox\n\t[jgarzik@pretzel netdev-2.6]$\n\n\nIdeas?  Full data needed to reproduce is attached.  .git/HEAD is \na4936044001694f033fe4ea94d6034d51a6b465c.\n\n\tJeff\n\n\n\n"},{"id":"5187","messageId":"Pine.LNX.4.58.0506230915330.11175@ppc970.osdl.org","threadId":"1011","inReplyTo":"42BA66C1.30400@pobox.com","subject":"Re: 'dotest' fails, patch(1) succeeds","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-23T16:22:44Z","receivedAt":"2005-06-23T16:22:44Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 23 Jun 2005, Jeff Garzik wrote:\n> \n> Trying to use git-tools' \"dotest\" script to merge an mbox into a kernel \n> git repo failed, but patch(1) was OK with it:\n> \n> \t[jgarzik@pretzel netdev-2.6]$ dotest /g/tmp/mbox\n> \n> \tApplying 'e1000: fix spinlock bug'\n> \n> \tfatal: corrupt patch at line 10\n\nYou have a corrupt patch, and \"git-apply\" not only tells you so, it tells \nyou _exactly_ where it is:\n\nIn particular, it has whitespace damage at line 10:\n\n 1 --- linux-2.6.12-clean/drivers/net/e1000/e1000_main.c\t2005-06-17 12:48:29.000000000 -0700\n 2 +++ linux-2.6.12/drivers/net/e1000/e1000_main.c\t2005-06-21 10:42:29.000000000 -0700\n 3 @@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, st\n 4  \ttso = e1000_tso(adapter, skb);\n 5  \tif (tso < 0) {\n 6  \t\tdev_kfree_skb_any(skb);\n 7 +\t\tspin_unlock_irqrestore(&adapter->tx_lock, flags);\n 8  \t\treturn NETDEV_TX_OK;\n 9  \t}\n10 \n\nAnd take a close look. That line should have _one_ space on it (the space \nthat says \"neither new nor old\"), and it's totally empty (well, now in my \nemail it has \"10 \" on it, of course ;)\n\nBtw, you have another problem: you should add a \"---\" marker to before the \npatch header, otherwise your commit message will have the \"diff -urpN\" \nthing in it. To the \"dotest\" scripts, \"---\" is the thing that says \"here \nends the message and the patch begins\".\n\n(The line numbers from \"git-apply\" will also start at that --- point, so \nif you add a \"---\" just above the \"diff\" line, you'd get \"line 12\" being \nthe corrupt one)\n\n\t\tLinus\n"}]}