summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-02 20:51:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-02 20:51:13 (GMT)
commitd4a5d872c05057c415347896bd416006153e4b03 (patch)
tree1719741d8f0743b11c5aa27a73d0e0132fc68b4b /unpack-trees.c
parent242cab397214b017ac837e870ac9950efc2968c3 (diff)
parentafd7bd22209c53ae4d3c73dd4bc4b225ec55e10a (diff)
downloadgit-d4a5d872c05057c415347896bd416006153e4b03.zip
git-d4a5d872c05057c415347896bd416006153e4b03.tar.gz
git-d4a5d872c05057c415347896bd416006153e4b03.tar.bz2
Merge branch 'jc/index-v4'
Trivially shrinks the on-disk size of the index file to save both I/O and checksum overhead. The topic should give a solid base to build on further updates, with the code refactoring in its earlier parts, and the backward compatibility mechanism in its later parts. * jc/index-v4: index-v4: document the entry format unpack-trees: preserve the index file version of original update-index: upgrade/downgrade on-disk index version read-cache.c: write prefix-compressed names in the index read-cache.c: read prefix-compressed names in index on-disk version v4 read-cache.c: move code to copy incore to ondisk cache to a helper function read-cache.c: move code to copy ondisk to incore cache to a helper function read-cache.c: report the header version we do not understand read-cache.c: make create_from_disk() report number of bytes it consumed read-cache.c: allow unaligned mapping of the index file cache.h: hide on-disk index details varint: make it available outside the context of pack
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 36523da..1d7393d 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1027,6 +1027,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
o->result.initialized = 1;
o->result.timestamp.sec = o->src_index->timestamp.sec;
o->result.timestamp.nsec = o->src_index->timestamp.nsec;
+ o->result.version = o->src_index->version;
o->merge_size = len;
mark_all_ce_unused(o->src_index);