Re: Bug in 'git am' when applying a broken patch

2015-06-26 Thread Junio C Hamano
Stefan Beller writes: > In the hunk header we can learn about the > expected lines to read for this hunk and after the hunk we only have > 3 possible lines: > > * it's the next hunk, then the line starts with @@ This is true. > * it's a new file, so the line starts with "diff --git" This i

Re: Bug in 'git am' when applying a broken patch

2015-06-26 Thread Stefan Beller
On Mon, Jun 1, 2015 at 1:23 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> s/enw/new/ > > Heh, thanks; I wasn't planning to commit this one yet, but why not. > Here is with an updated log message and a test. > > -- >8 -- > Subject: [PATCH] apply: reject a hunk that does not do anything >

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Greg KH
On Mon, Jun 01, 2015 at 01:23:26PM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > > s/enw/new/ > > Heh, thanks; I wasn't planning to commit this one yet, but why not. Well, it's not good to apply a commit with no actual commit. That never a good thing, and was the thing that really c

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Eric Sunshine writes: > s/enw/new/ Heh, thanks; I wasn't planning to commit this one yet, but why not. Here is with an updated log message and a test. -- >8 -- Subject: [PATCH] apply: reject a hunk that does not do anything A hunk like this in a hand-edited patch without correctly adjusting th

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Eric Sunshine
On Mon, Jun 1, 2015 at 2:58 PM, Junio C Hamano wrote: > Subject: apply: reject a hunk that does not do anything > > A hunk like this in a hand-edited patch without correctly adjusting > the line counts: > > @@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentic... > auth

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > It claims that it has only 2 lines in the hunk, so "git apply" > parses the hunk that begins at line 660 as such: > > @@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentic... > auth = (struct ieee80211_authentication *) > skb_p

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Greg KH writes: > But, there's nothing in the patch at all except the commit message: > > $ git show HEAD > ... > Any ideas what is going on here? Shouldn't 'git am' have failed? Yes. The patch reads like this: --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +++--

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Christian Couder
Hi Greg, On Mon, Jun 1, 2015 at 3:54 AM, Greg KH wrote: > On Mon, Jun 01, 2015 at 09:17:59AM +0900, Greg KH wrote: >> 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 p

Re: Bug in 'git am' when applying a broken patch

2015-05-31 Thread Greg KH
On Mon, Jun 01, 2015 at 09:17:59AM +0900, Greg KH wrote: > 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-ru

Bug in 'git am' when applying a broken patch

2015-05-31 Thread Greg KH
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/ie