summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--read-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/read-tree.c b/read-tree.c
index 11157f4242..59b6a6bff9 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -686,6 +686,9 @@ static int oneway_merge(struct cache_entry **src)
if (!a)
return deleted_entry(old, NULL);
if (old && same(old, a)) {
+ struct stat st;
+ if (lstat(old->name, &st) || ce_match_stat(old, &st, 1))
+ old->ce_flags |= htons(CE_UPDATE);
return keep_entry(old);
}
return merged_entry(a, NULL);