Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-29 Thread Junio C Hamano
On Thu, Jun 29, 2017 at 2:01 PM, Stefan Beller wrote: > On Tue, Jun 27, 2017 at 10:06 PM, Junio C Hamano wrote: >> Junio C Hamano writes: >> This probably deserves a bit more illustration of how I envision the >> code should evolve. >> ... > It turns out that the code here is rather a very loose

Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-29 Thread Stefan Beller
On Tue, Jun 27, 2017 at 10:06 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Looking at the implementation of get_ws_cleaned_string() that is the >> workhorse of emitted_symbol_cmp_no_ws(), it seems to be doing wrong >> things for various "ignore whitespace" options (i.e. there is only >

Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-28 Thread Junio C Hamano
Stefan Beller writes: > Originally I wanted to do that, see prep work in [1], but Jeff explained that > the additional pointer in the compare function is **not** supposed to be > a additional payload (such as the diff options specifying the white space > options.) > > [1] https://public-inbox.org

Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-28 Thread Stefan Beller
On Tue, Jun 27, 2017 at 10:06 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Looking at the implementation of get_ws_cleaned_string() that is the >> workhorse of emitted_symbol_cmp_no_ws(), it seems to be doing wrong >> things for various "ignore whitespace" options (i.e. there is only >

Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-27 Thread Junio C Hamano
Junio C Hamano writes: > Looking at the implementation of get_ws_cleaned_string() that is the > workhorse of emitted_symbol_cmp_no_ws(), it seems to be doing wrong > things for various "ignore whitespace" options (i.e. there is only > one implementation, while "git diff" family takes things like

Re: [PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-27 Thread Junio C Hamano
Stefan Beller writes: > Reuse the compare function from the hash map instead of calling the > compare function directly. Then we pick the correct compare function > when told to compare ignoring white space. > > Signed-off-by: Stefan Beller > --- > diff.c | 3 +-- > t/t4015

[PATCH 6/6] diff.c: detect blocks despite whitespace changes

2017-06-27 Thread Stefan Beller
Reuse the compare function from the hash map instead of calling the compare function directly. Then we pick the correct compare function when told to compare ignoring white space. Signed-off-by: Stefan Beller --- diff.c | 3 +-- t/t4015-diff-whitespace.sh | 65 ++