From: Johannes Schindelin Date: Mon, 11 Jul 2016 12:58:09 GMT Subject: Re: Unexpected diff is shown with -w -b options in effect Message-ID: In-Reply-To: <275091468237350@web16g.yandex.ru> Hi KES, On Mon, 11 Jul 2016, KES wrote: > For this diff > diff --git a/app/public/v2/index.html b/app/public/v2/index.html > index f73ba73..3af0c64 100644 > --- a/app/public/v2/index.html > +++ b/app/public/v2/index.html > @@ -21,11 +21,15 @@ > > >
> -
> -
MOV
> - > - > - > +
> +
> +
MOV
> + > + > +
> +
> + > +
>
>
>
First of all, I ask you to realize that this diff makes it really, really tedious to see your problem (too much going on there that is completely unrelated to the bug: long lines, unnecessarily complex HTML code, too big of a diff to compare two versions of the diff). It takes but a little time to clean it up, and then it is so much easier to make a case. As to: > [...] > >
> +
<<<<<<<<<<<<<<<<<<<<<<<< IS NOT EXPECTED >
vs: > [...] > > + <<<<<<<<<<<<<<<<<<<<<< EXPECT THIS > >
You asked for -w *and* for -b, i.e. ignore all white space *and* ignore white space change. The combination is bogus, of course, as "ignore all white space" includes "ignore white space change". If you use only -b, you will see the expected change. If you use -w, what you saw is actually expected, as git-diff was asked not to see a difference between the indented vs the unindented : it really *ignores* all white space in that case. It is not like: ignore all white space except when there are ambiguous matches. Ciao, Johannes