private void unindex(@NotNull VirtualFile root, @NotNull List<? extends FilePath> files, boolean toUnversioned) throws VcsException {
    GitFileUtils.deletePaths(myProject, root, files, "--cached", "-f"); //NON-NLS

    if (toUnversioned) {
      GitRepository repo = GitUtil.getRepositoryManager(myProject).getRepositoryForRoot(root);
      GitUntrackedFilesHolder untrackedFilesHolder = (repo == null ? null : repo.getUntrackedFilesHolder());
      if (untrackedFilesHolder != null) {
        untrackedFilesHolder.addUntracked(files);
      }
    }
  }
private void unindex(@NotNull VirtualFile root, @NotNull List<? extends FilePath> files, boolean toUnversioned)