diff options
author | Elijah Newren <newren@gmail.com> | 2018-04-19 20:58:18 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-08 10:11:00 +0300 |
commit | 2f682e21a6dc3b7403fd0162252183fdef019274 (patch) | |
tree | 7786c764e8bc53641337149f91818f5b919c5595 /merge-recursive.c | |
parent | bd42380ef1ec773d1557b28ba6924f4020333143 (diff) |
merge-recursive: avoid triggering add_cacheinfo error with dirty mod
If a cherry-pick or merge with a rename results in a skippable update
(due to the merged content matching what HEAD already had), but the
working directory is dirty, avoid trying to refresh the index as that
will fail.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index bffcd5fa51..804dfefd15 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2786,7 +2786,7 @@ static int merge_content(struct merge_options *o, path_renamed_outside_HEAD = !path2 || !strcmp(path, path2); if (!path_renamed_outside_HEAD) { if (add_cacheinfo(o, mfi.mode, &mfi.oid, path, - 0, (!o->call_depth), 0)) + 0, (!o->call_depth && !is_dirty), 0)) return -1; return mfi.clean; } |