Re: [PATCH] Documentation: networking: device drivers: Remove stray asterisks

From: Junio C Hamano
Date: Sun Dec 01 2019 - 01:36:15 EST


Jonathan Corbet <corbet@xxxxxxx> writes:

> On Sat, 30 Nov 2019 17:20:10 -0800
> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>> Do you use some special options for git? Like --whitespace=nowarn or
>> --3way or something like that?
>
> Sigh, that has to be it. I have --ignore-whitespace in my script. When I
> take that option out, the patch in question no longer applies.

OK, so it appears that the tool is working as documented. The
"ignore" stuff kicks in to fuzz the whitespace difference for the '
' lines and '-' lines, but the option itself does not give "git
apply" enough information to decide what to do with the extra
whitespace that is CR at the end of the line on the '+' lines.

I would also say it is doubtful that it is working as expected.
Perhaps --ignore-whitespace and --whitespace=fix ought to work well
together to allow matching preimage (i.e. ' ' and '-') lines, but
still fix whitespace-broken material in postimage (i.e. ' ' and
'+') lines before replacing the preimage with the postimage, or
something along that line?