mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
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 <gitster@pobox.com>
This commit is contained in:
parent
69dec66b2f
commit
9170c7ab28
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user