summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-18 21:02:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-18 21:02:38 (GMT)
commit6d011b8e3f36fc5b41d2451f488067ee367d7084 (patch)
treeefaf523a867e7689c8fc6cfb4b7a223d8cd9028b /merge-recursive.c
parentc7b317320c1301b6bcf4eb4ac824b76114068f11 (diff)
parent6e2068ae48000a2dfdb2044bbb91073c11f6fbff (diff)
downloadgit-6d011b8e3f36fc5b41d2451f488067ee367d7084.zip
git-6d011b8e3f36fc5b41d2451f488067ee367d7084.tar.gz
git-6d011b8e3f36fc5b41d2451f488067ee367d7084.tar.bz2
Merge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint
"merge-recursive" was broken in 1.7.7 era and stopped working in an empty (temporary) working tree, when there are renames involved. This has been corrected. * 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 8400a8e..4177092 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);