DialogState (@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) { final GitPullDialog dialog = new GitPullDialog(project, gitRoots, defaultRoot); if (!dialog.showAndGet()) { return null; } GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project); GitRepository repository = repositoryManager.getRepositoryForRootQuick(dialog.gitRoot()); assert repository != null : "Repository can't be null for root " + dialog.gitRoot(); return new DialogState(dialog.gitRoot(), GitBundle.message("pulling.title", dialog.getSelectedRemote().getName()), getHandlerProvider(project, dialog), dialog.getSelectedBranch(), dialog.isCommitAfterMerge(), ContainerUtil.map(dialog.getSelectedOptions(), option -> option.getOption())); }