tboegi@xxxxxx 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. > + ssize_t readlen = read(fd, buf, sizeof(buf)); xread() to automatically retry an interrupted read? > @@ -309,11 +354,13 @@ static int crlf_to_worktree(const char *path, const char *src, size_t len, > { > char *to_free = NULL; > struct text_stat stats; > + unsigned earlyout = CONVERT_STAT_BITS_TXT_CRLF | CONVERT_STAT_BITS_BIN; > + > > if (!len || output_eol(crlf_action) != EOL_CRLF) > return 0; > > - gather_stats(src, len, &stats); > + gather_stats(src, len, &stats, earlyout); Oops, this answers my earlier question, no? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html