void (@NotNull List<? extends Change> textChanges) { MultiMap<VcsRoot, Change> changesGroupedByRoot = MultiMap.create(); for (Change change : textChanges) { ContentRevision beforeRevision = change.getBeforeRevision(); if (beforeRevision != null) { FilePath file = beforeRevision.getFile(); VcsRoot vcsRoot = ProjectLevelVcsManager.getInstance(myProject).getVcsRootObjectFor(file); if (vcsRoot == null || vcsRoot.getVcs() == null) { LOG.error(file + " is not under VCS"); } else { changesGroupedByRoot.putValue(vcsRoot, change); } } } for (VcsRoot vcsRoot : changesGroupedByRoot.keySet()) { AbstractVcs vcs = Objects.requireNonNull(vcsRoot.getVcs()); if (vcs.getDiffProvider() != null) { vcs.getDiffProvider().preloadBaseRevisions(Objects.requireNonNull(vcsRoot.getPath()), changesGroupedByRoot.get(vcsRoot)); } } }