/** * Requires that a tag with the given name does not yet exist * * @param name The name of the tag to test * @throws com.atlassian.jgitflow.core.exception.TagExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireTagAbsent(String name) throws TagExistsException, JGitFlowGitAPIException { if (GitHelper.tagExists(git, name)) { reporter.errorText(commandName, "requireTagAbsent() failed: '" + name + "' already exists"); reporter.flush(); throw new TagExistsException("tag '" + name + "' already exists"); } }
/** * Requires that a tag with the given name does not yet exist * * @param name The name of the tag to test * @throws com.atlassian.jgitflow.core.exception.TagExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireTagAbsent(String name) throws TagExistsException, JGitFlowGitAPIException { if (GitHelper.tagExists(git, name)) { reporter.errorText(commandName, "requireTagAbsent() failed: '" + name + "' already exists"); reporter.flush(); throw new TagExistsException("tag '" + name + "' already exists"); } }
/** * Requires that a tag with the given name does not yet exist * @param name The name of the tag to test * @throws TagExistsException * @throws JGitFlowGitAPIException */ protected void requireTagAbsent(String name) throws TagExistsException, JGitFlowGitAPIException { if (GitHelper.tagExists(git, name)) { reporter.errorText(getCommandName(), "requireTagAbsent() failed: '" + name + "' already exists"); reporter.flush(); throw new TagExistsException("tag '" + name + "' already exists"); } }