private static @NotNull String getDiffOutput(@NotNull Project project,
                                      @NotNull VirtualFile root,
                                      @NotNull String diffRange,
                                      @Nullable Collection<? extends FilePath> dirtyPaths,
                                      boolean reverse,
                                      boolean detectRenames)
    throws VcsException {
    GitLineHandler h = GitUtil.createHandlerWithPaths(dirtyPaths, () -> {
      GitLineHandler handler = new GitLineHandler(project, root, GitCommand.DIFF);
      if (reverse) {
        handler.addParameters("-R");
      }
      handler.addParameters("--name-status", "--diff-filter=ADCMRUXT");
      if (detectRenames) {
        handler.addParameters("-M");
      }
      handler.addParameters(diffRange);
      handler.setSilent(true);
      handler.setStdoutSuppressed(true);
      return handler;
    });
    return Git.getInstance().runCommand(h).getOutputOrThrow();
  }
private static @NotNull String getDiffOutput(@NotNull Project project,
                                      @NotNull VirtualFile root,
                                      @NotNull String diffRange,
                                      @Nullable Collection<? extends FilePath> dirtyPaths,
                                      boolean reverse,
                                      boolean detectRenames)