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