void (@NotNull Collection<? extends FilePath> files, @NotNull @NlsContexts.ProgressTitle String operationTitle, @NotNull LongOperationPerRootExecutor executor) { GitVcs.runInBackground(new Task.Backgroundable(myProject, operationTitle) { @Override public void run(@NotNull ProgressIndicator indicator) { GitUtil.sortFilePathsByGitRootIgnoringMissing(myProject, files).forEach((root, filePaths) -> { try { executor.execute(root, filePaths); } catch (final VcsException ex) { GitVcsConsoleWriter.getInstance(myProject).showMessage(ex.getMessage()); } }); } }); }