Path (@NotNull Project project, @NotNull Collection<? extends Change> changes) { File commonAncestor = ChangesUtil.findCommonAncestor(changes); VirtualFile vcsRoot; if (commonAncestor == null || ChangesUtil.getAffectedVcses(changes, project).size() != 1) { vcsRoot = null; } else { vcsRoot = VcsUtil.getVcsRootFor(project, VcsUtil.getFilePath(commonAncestor, true)); } return vcsRoot == null ? ProjectKt.getStateStore(project).getProjectBasePath() : vcsRoot.toNioPath(); }