summaryrefslogtreecommitdiff
path: root/read-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-15 00:48:00 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-15 00:48:00 -0700
commite8efc9036fd7b793e84af4165fea715794924794 (patch)
tree2a6caf86a8f5a8f17d251a555344bad5bfeb6bc5 /read-tree.c
parentMerge branch 'se/diff' into next (diff)
parentread-tree -u one-way merge fix to check out locally modified paths. (diff)
downloadtgif-e8efc9036fd7b793e84af4165fea715794924794.tar.xz
Merge branch 'lt/oneway' into next
* lt/oneway: read-tree -u one-way merge fix to check out locally modified paths.
Diffstat (limited to 'read-tree.c')
-rw-r--r--read-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/read-tree.c b/read-tree.c
index 7c830312c4..3f02339547 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -723,6 +723,9 @@ static int oneway_merge(struct cache_entry **src)
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);