From: Junio C Hamano Date: Fri, 27 Apr 2012 22:58:13 +0000 (-0700) Subject: unpack-trees: preserve the index file version of original X-Git-Tag: v1.7.11-rc0~76^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9170c7ab2889a295de49458d7bd37d82f1556cd6;p=git.git unpack-trees: preserve the index file version of original Otherwise "git checkout $other_branch" (or even "git checkout HEAD") would end up writing the index out in the default format. Signed-off-by: Junio C Hamano --- diff --git a/unpack-trees.c b/unpack-trees.c index 7c9ecf665..2a037d6a4 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1020,6 +1020,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);