Jeff King <peff@xxxxxxxx> writes: > It's probably possible to teach the grep code to do the same > check-in-the-index trick, but I'm not sure how complicated it would be. I am not sure if we should even depend on the "check the object database and use it instead of reading the working tree files" done in diff code---somehow I thought we did the opposite for performance (i.e. when we ought to be comparing two objects, taken from tree and the index, if we notice that the index side is stat clean, we can read/mmap the working tree file instead of going to the object layer and deflating a loose object, or, worse yet, construct the blob by repeatedly applying deltas on a base object in a packfile). Is this one in the opposite direction done specifically for gaining performance when textconv cache is in use? If so, kudos to whoever did it---that sounds like a clever thing to do.