summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:14 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:14 -0800
commit156d6ed9221ff38c4cd3bfcfc6778e31c104fd9b (patch)
treed1e4e06d6b9f304bc1ce2deacd555183131d2be1 /merge-recursive.c
parent7da5fd6895af9066ad4684e333c57f4086589c2f (diff)
parent6e2068ae48000a2dfdb2044bbb91073c11f6fbff (diff)
downloadgit-156d6ed9221ff38c4cd3bfcfc6778e31c104fd9b.tar.gz
Merge branch 'bk/refresh-missing-ok-in-merge-recursive'
Allow "merge-recursive" to work in an empty (temporary) working tree again when there are renames involved, correcting an old regression in 1.7.7 era. * bk/refresh-missing-ok-in-merge-recursive: merge-recursive.c: tolerate missing files while refreshing index read-cache.c: extend make_cache_entry refresh flag with options read-cache.c: refactor --ignore-missing implementation t3030-merge-recursive: test known breakage with empty work tree
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 8400a8e937..4177092942 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -201,7 +201,9 @@ static int add_cacheinfo(unsigned int mode, const unsigned char *sha1,
const char *path, int stage, int refresh, int options)
{
struct cache_entry *ce;
- ce = make_cache_entry(mode, sha1 ? sha1 : null_sha1, path, stage, refresh);
+ ce = make_cache_entry(mode, sha1 ? sha1 : null_sha1, path, stage,
+ (refresh ? (CE_MATCH_REFRESH |
+ CE_MATCH_IGNORE_MISSING) : 0 ));
if (!ce)
return error(_("addinfo_cache failed for path '%s'"), path);
return add_cache_entry(ce, options);