void (@NotNull Project project, @NotNull VirtualFile root, @NotNull List<FilePath> filePaths) { for (List<String> paths : VcsFileUtil.chunkPaths(root, filePaths)) { GitLineHandler handler = new GitLineHandler(project, root, GitCommand.RESTORE); handler.addParameters("--staged", "--worktree", "--source=HEAD"); handler.endOptions(); handler.addParameters(paths); GitCommandResult result = Git.getInstance().runCommand(handler); if (!result.success()) { LOG.warn("Can't restore changes:" + result.getErrorOutputAsJoinedString()); } } }