From d9b94755b0ebc05f5dc9ef7619e951337115cbaf Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Tue, 26 Jun 2012 19:05:03 +0400 Subject: [PATCH] [git] "The conflict not found for the file" assertion: log the output as well to see why the conflict was not found I've faced this issue once, and at that time there was a conflict, and there were no Git processes in progress that could race with the GitMergeProvider and give information about some previous out-of-date state of the repository. --- plugins/git4idea/src/git4idea/merge/GitMergeProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java b/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java index 44a430482516..7a137a175f05 100644 --- a/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java +++ b/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java @@ -323,7 +323,8 @@ public class GitMergeProvider implements MergeProvider2 { for (VirtualFile f : files) { String path = VcsFileUtil.relativePath(root, f); Conflict c = cs.get(path); - assert c != null : "The conflict not found for the file: " + f.getPath() + "(" + path + ")"; + log.assertTrue(c != null, String.format("The conflict not found for the file: %s(%s)%nFull ls-files output: %n%s", + f.getPath(), path, output)); c.myFile = f; if (c.myStatusTheirs == null) { c.myStatusTheirs = Conflict.Status.DELETED;