From: Junio C Hamano Date: Mon, 15 May 2006 20:51:07 +0000 (-0700) Subject: Merge branch 'lt/oneway' into next X-Git-Tag: v1.4.1-rc1~106 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6fb133b84d4a3ff560f341f7879c6721b6fb0d7;p=git.git Merge branch 'lt/oneway' into next * lt/oneway: read-tree --reset -u fix. --- f6fb133b84d4a3ff560f341f7879c6721b6fb0d7 diff --cc read-tree.c index 3f0233954,e16e91b17..aa6172b52 --- a/read-tree.c +++ b/read-tree.c @@@ -718,14 -688,15 +723,17 @@@ 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); + if (reset) { + 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);