void (@NotNull VirtualFile root, @Nullable Collection<FilePath> affectedPaths, @NotNull Hash leftRevision, @Nullable Hash rightRevision) { UIUtil.invokeLaterIfNeeded(() -> { boolean isWithLocal = rightRevision == null; Collection<FilePath> filePaths = affectedPaths != null ? affectedPaths : Collections.singleton(VcsUtil.getFilePath(root)); String leftRevisionTitle = leftRevision.toShortString(); String rightRevisionTitle = isWithLocal ? GitBundle.message("git.log.diff.handler.local.version.name") : rightRevision.toShortString(); String dialogTitle = affectedPaths != null ? GitBundle.message("git.log.diff.handler.changes.between.revisions.in.paths.title", leftRevisionTitle, rightRevisionTitle, getTitleForPaths(root, affectedPaths)) : GitBundle.message("git.log.diff.handler.changes.between.revisions.title", leftRevisionTitle, rightRevisionTitle); CompareWithLocalDialog.LocalContent localContentSide = isWithLocal ? CompareWithLocalDialog.LocalContent.AFTER : CompareWithLocalDialog.LocalContent.NONE; CompareWithLocalDialog.showChanges(myProject, dialogTitle, localContentSide, () -> { if (isWithLocal) { return GitChangeUtils.getDiffWithWorkingDir(myProject, root, leftRevision.asString(), filePaths, false); } else { return GitChangeUtils.getDiff(myProject, root, leftRevision.asString(), rightRevision.asString(), filePaths); } }); }); }