summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-28 23:49:28 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-29 00:12:18 (GMT)
commite1ddc9768469cb8c25387dc0c75dd4f40ea71096 (patch)
tree8ed42f494d2c3a7643cb3a3e70115bb3a96a73d7 /pack-objects.c
parentfead2836a16829fba427635f92d7df9acf771a55 (diff)
downloadgit-e1ddc9768469cb8c25387dc0c75dd4f40ea71096.zip
git-e1ddc9768469cb8c25387dc0c75dd4f40ea71096.tar.gz
git-e1ddc9768469cb8c25387dc0c75dd4f40ea71096.tar.bz2
[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>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-objects.c b/pack-objects.c
index d1e62dc..36f515b 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) {