Jeff King <peff@xxxxxxxx> writes: > When sha1_loose_object_info() finds that a loose object file > cannot be stat(2)ed or mmap(2)ed, it returns -1 to signal an > error to the caller. However, if it found that the loose > object file is corrupt and the object data cannot be used > from it, it stuffs OBJ_BAD into "type" field of the > object_info, but returns zero (i.e., success), which can > confuse callers. Thanks for a nice analysis and a fix.