Junio C Hamano <gitster@xxxxxxxxx> writes: > But I suspect that the best fix is to teach diff_fill_oid_info() to > hash the in-memory data to compute the oid, instead of punting and > filling the oid field with null_oid. If function builtin_diffstat() > is allowed to look at the contents and run memcmp() here, the 'data' > field should have been filled and valid when diff_fill_oid_info() > looked at it already. > > The "best" fix will have wider consequences, so we may not want to > jump to it right away without careful consideration. And then after giving a bit more thought, I don't recommend to go with this approach, because it breaks an established convention that objects with unknown name is perfectly OK and shown with the null oid. In other words, I'd suggest to use the "second best" one I gave in the message I am responding to. Thanks.