private static @NotNull Collection<GitDiffChange> getLocalChanges(@NotNull Project project,
                                                                    @NotNull VirtualFile root,
                                                                    @Nullable Collection<FilePath> paths,
                                                                    @NonNls String... parameters) throws VcsException {
    if (paths != null && paths.isEmpty()) return Collections.emptyList();

    GitLineHandler handler = GitUtil.createHandlerWithPaths(paths, () -> {
      GitLineHandler diff = new GitLineHandler(project, root, GitCommand.DIFF);
      diff.addParameters("--name-status");
      diff.addParameters(parameters);
      return diff;
    });
    String output = Git.getInstance().runCommand(handler).getOutputOrThrow();

    Collection<GitDiffChange> changes = new ArrayList<>();
    parseChanges(root, new StringScanner(output), (status, beforePath, afterPath) -> {
      changes.add(new GitDiffChange(status, beforePath, afterPath));
    });
    return changes;
  }
private static @NotNull Collection<GitDiffChange> getLocalChanges(@NotNull Project project,
                                                                    @NotNull VirtualFile root,
                                                                    @Nullable Collection<FilePath> paths,
                                                                    @NonNls String... parameters)