summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fead283)
raw | patch | inline | side by side (parent: fead283)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 28 Jun 2005 23:49:28 +0000 (16:49 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Wed, 29 Jun 2005 00:12:18 +0000 (17:12 -0700) |
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>
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>
pack-objects.c | patch | blob | history | |
unpack-objects.c | patch | blob | history |
diff --git a/pack-objects.c b/pack-objects.c
index d1e62dc019b46afb4eab076be430381d8fe07c64..36f515b73821573e5a9be46ebb0b50cdb267b061 100644 (file)
--- a/pack-objects.c
+++ b/pack-objects.c
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) {
diff --git a/unpack-objects.c b/unpack-objects.c
index 98b696cf2cb88cc85a887c677718231fe8cf065f..fbc899408e78c18b5cfeae00ad66927e3ef25053 100644 (file)
--- a/unpack-objects.c
+++ b/unpack-objects.c
unpack_non_delta_entry(entry, type, pack, size, left);
return;
case OBJ_DELTA:
- unpack_delta_entry(entry, pack+5, size, left);
+ unpack_delta_entry(entry, pack, size, left);
return;
}
bad: