branchExists
public static boolean branchExists(GitRepositoryManager repoManager,
com.google.gerrit.reviewdb.client.Branch.NameKey branch)
throws org.eclipse.jgit.errors.RepositoryNotFoundException,
java.io.IOException
Checks whether the specified branch exists.
- Parameters:
repoManager - Git repository manager to open the git repository
branch - the branch for which it should be checked if it exists
- Returns:
true if the specified branch exists or if
HEAD points to this branch, otherwise
false
- Throws:
org.eclipse.jgit.errors.RepositoryNotFoundException - the repository of the branch's project
does not exist.
java.io.IOException - error while retrieving the branch from the repository.