git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git applymbox is too anal
@ 2005-09-08 23:25 Greg KH
  2005-09-08 23:39 ` Greg KH
  2005-09-09  0:58 ` Linus Torvalds
  0 siblings, 2 replies; 5+ messages in thread
From: Greg KH @ 2005-09-08 23:25 UTC (permalink / raw)
  To: git

Ick.  I'm trying to apply a bunch of patches to a git repo (the kernel
tree), using 'git applymbox' and it's just dieing on simple patches that
apply with fuzz.

for example:

$ git applymbox ~/linux/patches/u07

Applying 'USB: fix up URB_ASYNC_UNLINK usages from the usb-serial drivers'

error: patch failed: drivers/usb/serial/option.c:513
error: drivers/usb/serial/option.c: patch does not apply

$ patch -p1 --dry-run < ~/linux/patches/u07
patching file drivers/usb/serial/keyspan.c
patching file drivers/usb/serial/option.c
Hunk #3 succeeded at 509 with fuzz 1.


So, I have to then do a 'patch, git diff, git checkout-cache -f -u -a,
git applymbox' type dance to get this patch to apply.

Or am I missing some option to 'git applymbox' that I can't seem to
find?

thanks,

greg k-h

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

* Re: git applymbox is too anal
  2005-09-08 23:25 git applymbox is too anal Greg KH
@ 2005-09-08 23:39 ` Greg KH
  2005-09-09  1:03   ` Junio C Hamano
  2005-09-09  0:58 ` Linus Torvalds
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-09-08 23:39 UTC (permalink / raw)
  To: git

On Thu, Sep 08, 2005 at 04:25:35PM -0700, Greg KH wrote:
> Ick.  I'm trying to apply a bunch of patches to a git repo (the kernel
> tree), using 'git applymbox' and it's just dieing on simple patches that
> apply with fuzz.

Ok, found another one.  This time I looked at the patch itself, and it
is a bit "odd", but normal patch handles it fine.

The patch is:
--- gregkh-2.6.orig/drivers/usb/input/Makefile  2005-08-15 23:39:10.000000000 -0700
+++ gregkh-2.6/drivers/usb/input/Makefile       2005-08-16 12:31:54.000000000 -0700
@@ -39,5 +39,6 @@
 obj-$(CONFIG_USB_POWERMATE)    += powermate.o
 obj-$(CONFIG_USB_WACOM)        += wacom.o
 obj-$(CONFIG_USB_ACECAD)       += acecad.o
+obj-$(CONFIG_USB_YEALINK)      += yealink.o
 obj-$(CONFIG_USB_XPAD)         += xpad.o
 obj-$(CONFIG_USB_APPLETOUCH)   += appletouch.o

While the original drivers/usb/input/Makefile in this area is:
obj-$(CONFIG_USB_POWERMATE)     += powermate.o
obj-$(CONFIG_USB_WACOM)         += wacom.o
obj-$(CONFIG_USB_ACECAD)        += acecad.o
obj-$(CONFIG_USB_XPAD)          += xpad.o

(ignore tab issues, this was cut-and-pasted).

So, the patch shows that there was another line at the end of the file,
while in reality it isn't (this is due to me excluding a patch from the
series that I'm applying due to other reasons.)

Is this something that git can handle without me editing the patch by
hand?  :)

thanks,

greg k-h

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

* Re: git applymbox is too anal
  2005-09-08 23:25 git applymbox is too anal Greg KH
  2005-09-08 23:39 ` Greg KH
@ 2005-09-09  0:58 ` Linus Torvalds
  2005-09-09 17:07   ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2005-09-09  0:58 UTC (permalink / raw)
  To: Greg KH; +Cc: git



On Thu, 8 Sep 2005, Greg KH wrote:
> 
> Or am I missing some option to 'git applymbox' that I can't seem to
> find?

No. git-apply wants an exact bit-for-bit match. Partly because fuzz is 
hard, but mostly because I don't like it. I apply a _lot_ of patches, and 
if a unforgiving "git-apply" works for me, it should work for you too.

One issue is that I want to apply patches that apply cleanly, and if the 
patch was generated against some older kernel version, then it should 
quite likely be _applied_ towards that older kernel version. Then you can 
use git to merge the two.

Of course, I only do that occasionally, for bigger clashes. For smaller 
things, I just edit the patch by hand. And sometimes, I ask the sending 
side to re-generate the patch.

Applying with a fuzz does the right thing most of the time. But "most" 
isn't good enough. I'd rather have a human look at anything that requires 
fuzz.

		Linus

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

* Re: git applymbox is too anal
  2005-09-08 23:39 ` Greg KH
@ 2005-09-09  1:03   ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2005-09-09  1:03 UTC (permalink / raw)
  To: Greg KH; +Cc: git

Greg KH <greg@kroah.com> writes:

> So, the patch shows that there was another line at the end of the file,
> while in reality it isn't (this is due to me excluding a patch from the
> series that I'm applying due to other reasons.)
>
> Is this something that git can handle without me editing the patch by
> hand?  :)

Linus was quite strict about rejecting any fuzz, but I am
sympathetic to the cause.  I do not mind if somebody comes up
with a patch to add '--fuzz' option to git-apply; we can try
applying first without --fuzz and ask the user if he wants one
from 'git applymbox' main loop when it fails.

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

* Re: git applymbox is too anal
  2005-09-09  0:58 ` Linus Torvalds
@ 2005-09-09 17:07   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2005-09-09 17:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

On Thu, Sep 08, 2005 at 05:58:18PM -0700, Linus Torvalds wrote:
> 
> 
> On Thu, 8 Sep 2005, Greg KH wrote:
> > 
> > Or am I missing some option to 'git applymbox' that I can't seem to
> > find?
> 
> No. git-apply wants an exact bit-for-bit match. Partly because fuzz is 
> hard, but mostly because I don't like it. I apply a _lot_ of patches, and 
> if a unforgiving "git-apply" works for me, it should work for you too.

Ok, as I've been using quilt to stage patches before they are ready to
send to you, sometimes, when I build up the final tree, there are tiny
fuzz issues.  I'll just make sure to fix this up before running
applymbox in the future.

thanks,

greg k-h

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

end of thread, other threads:[~2005-09-09 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 23:25 git applymbox is too anal Greg KH
2005-09-08 23:39 ` Greg KH
2005-09-09  1:03   ` Junio C Hamano
2005-09-09  0:58 ` Linus Torvalds
2005-09-09 17:07   ` Greg KH

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).