[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 <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
fead2836a1
commit
e1ddc97684
@ -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);
|
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
|
* The object header is a byte of 'type' followed by zero or
|
||||||
* length, except for deltas that has the 20 bytes of delta sha
|
* more bytes of length. For deltas, the 20 bytes of delta sha1
|
||||||
* instead.
|
* follows that.
|
||||||
*/
|
*/
|
||||||
obj_type = entry->type;
|
obj_type = entry->type;
|
||||||
if (entry->delta) {
|
if (entry->delta) {
|
||||||
|
@ -271,7 +271,7 @@ static void unpack_entry(struct pack_entry *entry)
|
|||||||
unpack_non_delta_entry(entry, type, pack, size, left);
|
unpack_non_delta_entry(entry, type, pack, size, left);
|
||||||
return;
|
return;
|
||||||
case OBJ_DELTA:
|
case OBJ_DELTA:
|
||||||
unpack_delta_entry(entry, pack+5, size, left);
|
unpack_delta_entry(entry, pack, size, left);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bad:
|
bad:
|
||||||
|
Reference in New Issue
Block a user