diff --git a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java index 9d243784db..ad07dbc5a0 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java @@ -157,6 +157,25 @@ public final class RepositoryService implements Closeable repository, preProcessorUtil); } + /** + * The branches command list all repository branches. + * + * @return instance of {@link BranchesCommandBuilder} + * @throws CommandNotSupportedException if the command is not supported + * by the implementation of the repository service provider. + */ + public BranchesCommandBuilder getBranchesCommand() + { + if (logger.isDebugEnabled()) + { + logger.debug("create branches command for repository {}", + repository.getName()); + } + + return new BranchesCommandBuilder(cacheManager, + provider.getBranchesCommand(), repository); + } + /** * The browse command allows browsing of a repository. *