Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-27 Thread Christian Couder
On Tue, Apr 26, 2016 at 10:20 PM, Junio C Hamano wrote: > Christian Couder writes: > >>> It's not clear why we need to declare buf here? Oh wait it is. It's just >>> moved from the start of the function. But why do it in this patch? >>> It seems

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-26 Thread Junio C Hamano
Christian Couder writes: >> It's not clear why we need to declare buf here? Oh wait it is. It's just >> moved from the start of the function. But why do it in this patch? >> It seems unrelated to the general intent of the patch. No need to reroll >> for this nit

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-26 Thread Christian Couder
On Mon, Apr 25, 2016 at 8:50 PM, Stefan Beller wrote: >> @@ -2251,7 +2319,7 @@ static int match_fragment(struct image *img, >> int match_beginning, int match_end) >> { >> int i; >> - char *fixed_buf, *buf, *orig, *target; >> +

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-25 Thread Stefan Beller
> @@ -2251,7 +2319,7 @@ static int match_fragment(struct image *img, > int match_beginning, int match_end) > { > int i; > - char *fixed_buf, *buf, *orig, *target; > + char *fixed_buf, *orig, *target; > struct strbuf fixed; > size_t

[PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-24 Thread Christian Couder
The match_fragment() function is very big and contains a big special case algorithm that does line by line fuzzy matching. So let's extract this algorithm in a separate line_by_line_fuzzy_match() function. Signed-off-by: Christian Couder --- builtin/apply.c | 129