Jeff King <peff@xxxxxxxx> writes: > This is holding internal state in diff_options, but the same > diff_options is often used for multiple diffs (e.g., "git log --raw" > would use the same rev_info.diffopt over and over again). > > So it would need to be cleared between diffs. There's a similar feature > in the "has_changes" flag, though it looks like it is cleared manually > by callers. Yuck. Do you mean we want reset_per_invocation_part_of_diff_options() helper or something? > I actually wonder if this could be rolled into the has_changes and > diff_can_quit_early() feature. This really just a generalization of that > feature (which is like setting max_changes to "1"). Yeah, I wondered about the same thing, after seeing the impressive numbers ;-)