[PATCH v6 1/4] sha1_file.c: support reading from a loose object of unknown type

2015-04-02 Thread Karthik Nayak
Update sha1_loose_object_info() to optionally allow it to read from a loose object file of unknown/bogus type; as the function usually returns the type of the object it read in the form of enum for known types, add an optional typename field to receive the name of the type in textual form and a

Re: [PATCH v6 1/4] sha1_file.c: support reading from a loose object of unknown type

2015-04-02 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: +static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char *map, + unsigned long mapsize, + struct strbuf *header) +{ + unsigned char buffer[32], *cp; +