Package com.google.gerrit.server
Class ProjectUtil
- java.lang.Object
 - 
- com.google.gerrit.server.ProjectUtil
 
 
- 
public class ProjectUtil extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description ProjectUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanbranchExists(GitRepositoryManager repoManager, BranchNameKey branch)Checks whether the specified branch exists.static StringsanitizeProjectName(String name)static StringstripGitSuffix(String name) 
 - 
 
- 
- 
Method Detail
- 
branchExists
public static boolean branchExists(GitRepositoryManager repoManager, BranchNameKey branch) throws org.eclipse.jgit.errors.RepositoryNotFoundException, IOException
Checks whether the specified branch exists.- Parameters:
 repoManager- Git repository manager to open the git repositorybranch- the branch for which it should be checked if it exists- Returns:
 trueif the specified branch exists or ifHEADpoints to this branch, otherwisefalse- Throws:
 org.eclipse.jgit.errors.RepositoryNotFoundException- the repository of the branch's project does not exist.IOException- error while retrieving the branch from the repository.
 
 - 
 
 -