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
Karthik Nayak karthik@gmail.com writes:
+ if ((flags LOOKUP_LITERALLY)) {
+ if (unpack_sha1_header_to_strbuf(stream, map, mapsize,
hdrbuf) 0)
+ status = error(unable to unpack %s header with
--literally,
+
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;
+
On 03/26/2015 12:57 AM, Junio C Hamano wrote:
Karthik Nayak karthik@gmail.com writes:
+static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char
*map,
+ unsigned long mapsize,
+ struct strbuf
karthik nayak karthik@gmail.com writes:
I hope you meant the former.
I did mean the latter, which spends more lines without much
information (i.e. only closing braces), only to reduce the
duplication of two simple lines.
But you are right, I did miss the distinction between hdrbuf.buf and
On 03/26/2015 12:43 AM, Junio C Hamano wrote:
Karthik Nayak karthik@gmail.com writes:
+ if ((flags LOOKUP_LITERALLY)) {
+ if (unpack_sha1_header_to_strbuf(stream, map, mapsize, hdrbuf)
0)
+ status = error(unable to unpack %s header with
6 matches
Mail list logo