Re: [PATCH v9 2/6] convert.c: stream and early out

2016-05-10 Thread Torsten Bögershausen
On 09.05.16 22:29, Junio C Hamano wrote: > tbo...@web.de writes: > >> +if (stats->stat_bits & earlyout) >> +break; /* We found what we have been searching for */ > > Are we sure if our callers are only interested in just one bit at a > time? Otherwise, if we want

Re: [PATCH v9 2/6] convert.c: stream and early out

2016-05-09 Thread Junio C Hamano
tbo...@web.de writes: > + if (stats->stat_bits & earlyout) > + break; /* We found what we have been searching for */ Are we sure if our callers are only interested in just one bit at a time? Otherwise, if we want to ensure all of the given bits are set, i

[PATCH v9 2/6] convert.c: stream and early out

2016-05-06 Thread tboegi
From: Torsten Bögershausen When statistics are done for the autocrlf handling, the search in the content can be stopped, if e.g - a search for binary is done, and a NUL character is found - a search for CRLF is done, and the first CRLF is found. Similar when statistics for binary vs non-binary a