merge-recursive.c: tolerate missing files while refreshing index
commit6e2068ae48000a2dfdb2044bbb91073c11f6fbff
authorBrad King <brad.king@kitware.com>
Mon, 27 Jan 2014 14:45:09 +0000 (27 09:45 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2014 22:31:30 +0000 (24 14:31 -0800)
treee5af6529e9e806d99ff89d41f1682c921cb345b6
parent257627268ad19cb616ad3feb6ca8171d400df287
merge-recursive.c: tolerate missing files while refreshing index

Teach add_cacheinfo to tell make_cache_entry to skip refreshing stat
information when a file is missing from the work tree.  We do not want
the index to be stat-dirty after the merge but also do not want to fail
when a file happens to be missing.

This fixes the 'merge-recursive w/ empty work tree - ours has rename'
case in t3030-merge-recursive.

Suggested-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
t/t3030-merge-recursive.sh