From e1ddc9768469cb8c25387dc0c75dd4f40ea71096 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 28 Jun 2005 16:49:28 -0700 Subject: [PATCH] Fix unpack-objects for header length information. Standalone unpack-objects command was not adjusted for header length encoding change when dealing with deltified entry. This fixes it. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- pack-objects.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pack-objects.c') diff --git a/pack-objects.c b/pack-objects.c index d1e62dc019..36f515b738 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -97,9 +97,9 @@ static unsigned long write_object(struct sha1file *f, struct object_entry *entry die("object %s size inconsistency (%lu vs %lu)", sha1_to_hex(entry->sha1), size, entry->size); /* - * The object header is a byte of 'type' followed by four bytes of - * length, except for deltas that has the 20 bytes of delta sha - * instead. + * The object header is a byte of 'type' followed by zero or + * more bytes of length. For deltas, the 20 bytes of delta sha1 + * follows that. */ obj_type = entry->type; if (entry->delta) { -- cgit v1.2.3