private static void addPathsImpl(@NotNull Project project, @NotNull VirtualFile root,
                                   @NotNull List<String> paths,
                                   boolean force, boolean filterOutIgnored,
                                   String... additionalOptions) throws VcsException {
    if (filterOutIgnored) {
      paths = excludeIgnoredFiles(project, root, paths);
      if (paths.isEmpty()) return;
    }

    GitLineHandler handler = new GitLineHandler(project, root, GitCommand.ADD);
    handler.addParameters("--ignore-errors", "-A");
    if (force) handler.addParameters("-f");
    handler.addParameters(additionalOptions);
    handler.endOptions();
    handler.addParameters(paths);
    Git.getInstance().runCommand(handler).throwOnError();
  }
private static void addPathsImpl(@NotNull Project project, @NotNull VirtualFile root,
                                   @NotNull List<String> paths,
                                   boolean force, boolean filterOutIgnored,
                                   String... additionalOptions)