From: Junio C Hamano Date: Mon, 15 May 2006 07:48:00 +0000 (-0700) Subject: Merge branch 'lt/oneway' into next X-Git-Tag: v1.4.1-rc1~110 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e8efc9036fd7b793e84af4165fea715794924794;p=git.git Merge branch 'lt/oneway' into next * lt/oneway: read-tree -u one-way merge fix to check out locally modified paths. --- e8efc9036fd7b793e84af4165fea715794924794 diff --cc read-tree.c index 7c830312c,59b6a6bff..3f0233954 --- a/read-tree.c +++ b/read-tree.c @@@ -718,11 -683,12 +718,14 @@@ static int oneway_merge(struct cache_en return error("Cannot do a oneway merge of %d trees", merge_size); - if (!a) + if (!a) { + invalidate_ce_path(old); 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);