git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in 'git am' when applying a broken patch
@ 2015-06-01  0:17 Greg KH
  2015-06-01  1:54 ` Greg KH
  2015-06-01 18:31 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Greg KH @ 2015-06-01  0:17 UTC (permalink / raw)
  To: git; +Cc: Gaston Gonzalez

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

Hi all,

I received the patch attached below as part of a submission against the
Linux kernel tree.  The patch seems to have been hand-edited, and is not
correct, and patch verifies this as being a problem:

$ patch -p1 --dry-run < bad_patch.mbox 
checking file drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
patch: **** malformed patch at line 133:                skb_put(skb, sizeof(struct ieee80211_authentication));

But git will actually apply it:
$ git am -s bad_patch.mbox
Applying: staging: rtl8192u: ieee80211: Fix sparse endianness warnings

But, there's nothing in the patch at all except the commit message:

$ git show HEAD
commit f6643dfef5b701db86f23be9ce6fb5b3bafe76b6
Author: Gaston Gonzalez <gascoar@gmail.com>
Date:   Sun May 31 12:17:48 2015 -0300

    staging: rtl8192u: ieee80211: Fix sparse endianness warnings
    
    Fix the following sparse warnings:
    
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32:    expected restricted __le16 [usertype] frame_ctl
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32:    got int
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50:    left side has type restricted __le16
    drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50:    right side has type int
    
    Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

$ git diff HEAD^
$ 

Any ideas what is going on here?  Shouldn't 'git am' have failed?

Oh, I'm using git version 2.4.2 right now.

I've asked Gaston for the original patch to verify before he hand-edited
it, to verify that git wasn't creating something wrong here, as well.

thanks,

greg k-h

[-- Attachment #2: bad_patch.mbox --]
[-- Type: application/mbox, Size: 8044 bytes --]

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

end of thread, other threads:[~2015-06-26 21:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01  0:17 Bug in 'git am' when applying a broken patch Greg KH
2015-06-01  1:54 ` Greg KH
2015-06-01 12:09   ` Christian Couder
2015-06-01 18:31 ` Junio C Hamano
2015-06-01 18:58   ` Junio C Hamano
2015-06-01 20:09     ` Eric Sunshine
2015-06-01 20:23       ` Junio C Hamano
2015-06-02  1:26         ` Greg KH
2015-06-26 19:49         ` Stefan Beller
2015-06-26 20:58           ` Junio C Hamano

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