GitCommandResult (@NotNull GitRepository repository, @NotNull String tagName, @Nullable GitLineHandlerListener listener, @NotNull String reference) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.TAG); h.setSilent(false); h.addParameters(tagName); if (!reference.isEmpty()) { h.addParameters(reference); } if (listener != null) { h.addLineListener(listener); } return runCommand(h); }