git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'dotest' fails, patch(1) succeeds
@ 2005-06-23  7:37 Jeff Garzik
  2005-06-23 16:22 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2005-06-23  7:37 UTC (permalink / raw)
  To: Linus Torvalds, Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]


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
	[jgarzik@pretzel netdev-2.6]$ patch -sp1  < /g/tmp/mbox
	[jgarzik@pretzel netdev-2.6]$


Ideas?  Full data needed to reproduce is attached.  .git/HEAD is 
a4936044001694f033fe4ea94d6034d51a6b465c.

	Jeff




[-- Attachment #2: mbox.bz2 --]
[-- Type: application/x-bzip2, Size: 1755 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 'dotest' fails, patch(1) succeeds
  2005-06-23  7:37 'dotest' fails, patch(1) succeeds Jeff Garzik
@ 2005-06-23 16:22 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2005-06-23 16:22 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Git Mailing List



On Thu, 23 Jun 2005, Jeff Garzik wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-23 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-23  7:37 'dotest' fails, patch(1) succeeds Jeff Garzik
2005-06-23 16:22 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).