Re: [PATCH 1/2] sha1_loose_object_info: return error for corrupted objects
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> 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.