Re: [PATCH v9 2/6] convert.c: stream and early out
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- May 11, 2016, 04:30 UTC
- Message-ID
- <eaf7b2e2-59d3-7b12-e9dd-d63203b05384@web.de>
- In-Reply-To
- <xmqqtwi7t1of.fsf@gitster.mtv.corp.google.com>
On 09.05.16 22:29, Junio C Hamano wrote:
Show 14 quoted lines
> tboegi@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, > > if ((stats->stat_bits & earlyout) == earlyout) > break; > > would be necessary. Otherwise, the "only one bit" assumption on the > "earlyout" parameter somehow needs to be documented in the code.
Thanks for pointing that out. I have changed the code a couple of times, forth and back. I want to re-roll the series anyway (probably in the next weeks), so something like "search_only_flags" may be a better name.