Jeff King <peff@xxxxxxxx> writes: >> Answer. There is a single hit inside fsck.c that wants to report >> an error without killing ourselves in fsck_commit_buffer(). I >> however doubt its use of get_commit_tree() is correct in the >> first place. The function is about validating the commit object >> payload manually, without trusting the result of parse_commit(), >> and it does read the object name of the tree object; the call to >> get_commit_tree() used for reporting the error there should >> probably become has_object() on the tree_oid. > > I actually think that check should be removed entirely. That function is > about checking the syntactic validity of the object itself, not about > connectivity (which is handled separately). We already check that we > have a valid "tree" pointer earlier in the function. Of course, you're right.