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

Re: 'dotest' fails, patch(1) succeeds

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 23, 2005, 16:22 UTC
Message-ID
<Pine.LNX.4.58.0506230915330.11175@ppc970.osdl.org>
In-Reply-To
<42BA66C1.30400@pobox.com>
On Thu, 23 Jun 2005, Jeff Garzik wrote:
Show 9 quoted lines
> 
> Trying to use git-tools' "dotest" script to merge an mbox into a kernel 
> git repo failed, but patch(1) was OK with it:
> 
> 	[jgarzik@pretzel netdev-2.6]$ dotest /g/tmp/mbox
> 
> 	Applying 'e1000: fix spinlock bug'
> 
> 	fatal: corrupt patch at line 10

You have a corrupt patch, and "git-apply" not only tells you so, it tells you _exactly_ where it is:

In particular, it has whitespace damage at line 10:
 1 --- linux-2.6.12-clean/drivers/net/e1000/e1000_main.c	2005-06-17 12:48:29.000000000 -0700
 2 +++ linux-2.6.12/drivers/net/e1000/e1000_main.c	2005-06-21 10:42:29.000000000 -0700
 3 @@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
 4  	tso = e1000_tso(adapter, skb);
 5  	if (tso < 0) {
 6  		dev_kfree_skb_any(skb);
 7 +		spin_unlock_irqrestore(&adapter->tx_lock, flags);
 8  		return NETDEV_TX_OK;
 9  	}
10 

And take a close look. That line should have _one_ space on it (the space that says "neither new nor old"), and it's totally empty (well, now in my email it has "10 " on it, of course ;)

Btw, you have another problem: you should add a "---" marker to before the patch header, otherwise your commit message will have the "diff -urpN" thing in it. To the "dotest" scripts, "---" is the thing that says "here ends the message and the patch begins".

(The line numbers from "git-apply" will also start at that --- point, so if you add a "---" just above the "diff" line, you'd get "line 12" being the corrupt one)

		Linus
Previous: Jeff Garzik
Message 2 of 2 in “'dotest' fails, patch(1) succeeds”
  1. Jeff GarzikJun 23, 2005
  2. Linus TorvaldsJun 23, 2005

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.