Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-04-19 20:58:18 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-08 10:11:00 +0300
commit2f682e21a6dc3b7403fd0162252183fdef019274 (patch)
tree7786c764e8bc53641337149f91818f5b919c5595 /merge-recursive.c
parentbd42380ef1ec773d1557b28ba6924f4020333143 (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.c2
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;
}