diff --git a/unpack-trees.c b/unpack-trees.c index e9eb795d64..aa2513ed79 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -590,7 +590,7 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old, * a match. */ if (same(old, merge)) { - *merge = *old; + memcpy(merge, old, offsetof(struct cache_entry, name)); } else { verify_uptodate(old, o); invalidate_ce_path(old);