From: Greg KH <gregkh@linuxfoundation.org>
To: git@vger.kernel.org
Cc: Gaston Gonzalez <gascoar@gmail.com>
Subject: Bug in 'git am' when applying a broken patch
Date: Mon, 1 Jun 2015 09:17:59 +0900 [thread overview]
Message-ID: <20150601001759.GA3934@kroah.com> (raw)
[-- 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 --]
next reply other threads:[~2015-06-01 0:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 0:17 Greg KH [this message]
2015-06-01 1:54 ` Bug in 'git am' when applying a broken patch 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150601001759.GA3934@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gascoar@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).