[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.
This commit is contained in:
Kirill Likhodedov
2012-06-26 19:55:08 +04:00
parent 6d8a78c66d
commit d9b94755b0
@@ -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;