public static @NotNull List<String> getAllTags(@NotNull Project project, @NotNull VirtualFile root) throws VcsException {
    GitLineHandler h = new GitLineHandler(project, root, GitCommand.TAG);
    h.addParameters("-l");
    h.setSilent(true);

    List<String> tags = new ArrayList<>();
    h.addLineListener(new GitLineHandlerListener() {
      @Override
      public void onLineAvailable(String line, Key outputType) {
        if (outputType != ProcessOutputTypes.STDOUT) return;
        if (line.length() != 0) tags.add(line);
      }
    });

    GitCommandResult result = Git.getInstance().runCommandWithoutCollectingOutput(h);
    result.throwOnError();

    return tags;
  }
public static @NotNull List<String> getAllTags(@NotNull Project project, @NotNull VirtualFile root)