{"thread":{"id":"1752","subject":"git applymbox is too anal","startedAt":"2005-09-08T23:25:35Z","lastAt":"2005-09-09T17:07:56Z","messageCount":5,"participants":["Greg KH","Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8222","messageId":"20050908232535.GA7700@kroah.com","threadId":"1752","inReplyTo":null,"subject":"git applymbox is too anal","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2005-09-08T23:25:35Z","receivedAt":"2005-09-08T23:25:35Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"Ick.  I'm trying to apply a bunch of patches to a git repo (the kernel\ntree), using 'git applymbox' and it's just dieing on simple patches that\napply with fuzz.\n\nfor example:\n\n$ git applymbox ~/linux/patches/u07\n\nApplying 'USB: fix up URB_ASYNC_UNLINK usages from the usb-serial drivers'\n\nerror: patch failed: drivers/usb/serial/option.c:513\nerror: drivers/usb/serial/option.c: patch does not apply\n\n$ patch -p1 --dry-run < ~/linux/patches/u07\npatching file drivers/usb/serial/keyspan.c\npatching file drivers/usb/serial/option.c\nHunk #3 succeeded at 509 with fuzz 1.\n\n\nSo, I have to then do a 'patch, git diff, git checkout-cache -f -u -a,\ngit applymbox' type dance to get this patch to apply.\n\nOr am I missing some option to 'git applymbox' that I can't seem to\nfind?\n\nthanks,\n\ngreg k-h\n"},{"id":"8223","messageId":"20050908233906.GA7976@kroah.com","threadId":"1752","inReplyTo":"20050908232535.GA7700@kroah.com","subject":"Re: git applymbox is too anal","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2005-09-08T23:39:06Z","receivedAt":"2005-09-08T23:39:06Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, Sep 08, 2005 at 04:25:35PM -0700, Greg KH wrote:\n> Ick.  I'm trying to apply a bunch of patches to a git repo (the kernel\n> tree), using 'git applymbox' and it's just dieing on simple patches that\n> apply with fuzz.\n\nOk, found another one.  This time I looked at the patch itself, and it\nis a bit \"odd\", but normal patch handles it fine.\n\nThe patch is:\n--- gregkh-2.6.orig/drivers/usb/input/Makefile  2005-08-15 23:39:10.000000000 -0700\n+++ gregkh-2.6/drivers/usb/input/Makefile       2005-08-16 12:31:54.000000000 -0700\n@@ -39,5 +39,6 @@\n obj-$(CONFIG_USB_POWERMATE)    += powermate.o\n obj-$(CONFIG_USB_WACOM)        += wacom.o\n obj-$(CONFIG_USB_ACECAD)       += acecad.o\n+obj-$(CONFIG_USB_YEALINK)      += yealink.o\n obj-$(CONFIG_USB_XPAD)         += xpad.o\n obj-$(CONFIG_USB_APPLETOUCH)   += appletouch.o\n\nWhile the original drivers/usb/input/Makefile in this area is:\nobj-$(CONFIG_USB_POWERMATE)     += powermate.o\nobj-$(CONFIG_USB_WACOM)         += wacom.o\nobj-$(CONFIG_USB_ACECAD)        += acecad.o\nobj-$(CONFIG_USB_XPAD)          += xpad.o\n\n(ignore tab issues, this was cut-and-pasted).\n\nSo, the patch shows that there was another line at the end of the file,\nwhile in reality it isn't (this is due to me excluding a patch from the\nseries that I'm applying due to other reasons.)\n\nIs this something that git can handle without me editing the patch by\nhand?  :)\n\nthanks,\n\ngreg k-h\n"},{"id":"8224","messageId":"Pine.LNX.4.58.0509081754150.3051@g5.osdl.org","threadId":"1752","inReplyTo":"20050908232535.GA7700@kroah.com","subject":"Re: git applymbox is too anal","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-09T00:58:18Z","receivedAt":"2005-09-09T00:58:18Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 8 Sep 2005, Greg KH wrote:\n> \n> Or am I missing some option to 'git applymbox' that I can't seem to\n> find?\n\nNo. git-apply wants an exact bit-for-bit match. Partly because fuzz is \nhard, but mostly because I don't like it. I apply a _lot_ of patches, and \nif a unforgiving \"git-apply\" works for me, it should work for you too.\n\nOne issue is that I want to apply patches that apply cleanly, and if the \npatch was generated against some older kernel version, then it should \nquite likely be _applied_ towards that older kernel version. Then you can \nuse git to merge the two.\n\nOf course, I only do that occasionally, for bigger clashes. For smaller \nthings, I just edit the patch by hand. And sometimes, I ask the sending \nside to re-generate the patch.\n\nApplying with a fuzz does the right thing most of the time. But \"most\" \nisn't good enough. I'd rather have a human look at anything that requires \nfuzz.\n\n\t\tLinus\n"},{"id":"8226","messageId":"7vd5njrr0s.fsf@assigned-by-dhcp.cox.net","threadId":"1752","inReplyTo":"20050908233906.GA7976@kroah.com","subject":"Re: git applymbox is too anal","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-09T01:03:47Z","receivedAt":"2005-09-09T01:03:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Greg KH <greg@kroah.com> writes:\n\n> So, the patch shows that there was another line at the end of the file,\n> while in reality it isn't (this is due to me excluding a patch from the\n> series that I'm applying due to other reasons.)\n>\n> Is this something that git can handle without me editing the patch by\n> hand?  :)\n\nLinus was quite strict about rejecting any fuzz, but I am\nsympathetic to the cause.  I do not mind if somebody comes up\nwith a patch to add '--fuzz' option to git-apply; we can try\napplying first without --fuzz and ask the user if he wants one\nfrom 'git applymbox' main loop when it fails.\n"},{"id":"8240","messageId":"20050909170756.GB24894@kroah.com","threadId":"1752","inReplyTo":"Pine.LNX.4.58.0509081754150.3051@g5.osdl.org","subject":"Re: git applymbox is too anal","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2005-09-09T17:07:56Z","receivedAt":"2005-09-09T17:07:56Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, Sep 08, 2005 at 05:58:18PM -0700, Linus Torvalds wrote:\n> \n> \n> On Thu, 8 Sep 2005, Greg KH wrote:\n> > \n> > Or am I missing some option to 'git applymbox' that I can't seem to\n> > find?\n> \n> No. git-apply wants an exact bit-for-bit match. Partly because fuzz is \n> hard, but mostly because I don't like it. I apply a _lot_ of patches, and \n> if a unforgiving \"git-apply\" works for me, it should work for you too.\n\nOk, as I've been using quilt to stage patches before they are ready to\nsend to you, sometimes, when I build up the final tree, there are tiny\nfuzz issues.  I'll just make sure to fix this up before running\napplymbox in the future.\n\nthanks,\n\ngreg k-h\n"}]}