projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69dec66
)
unpack-trees: preserve the index file version of original
author
Junio C Hamano
<gitster@pobox.com>
Fri, 27 Apr 2012 22:58:13 +0000
(15:58 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 27 Apr 2012 23:03:29 +0000
(16:03 -0700)
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>
unpack-trees.c
patch
|
blob
|
history
diff --git
a/unpack-trees.c
b/unpack-trees.c
index 7c9ecf665d062d79e9208875d9bf2577e98f4fb2..2a037d6a423a7ab9d55036972e52dfad88d369b4 100644
(file)
--- 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);