Class JGitBranchCommand
- java.lang.Object
- 
- org.apache.maven.scm.command.AbstractCommand
- 
- org.apache.maven.scm.command.branch.AbstractBranchCommand
- 
- org.apache.maven.scm.provider.git.jgit.command.branch.JGitBranchCommand
 
 
 
- 
- All Implemented Interfaces:
- Command,- GitCommand,- CustomizableSshSessionFactoryCommand
 
 public class JGitBranchCommand extends AbstractBranchCommand implements GitCommand, CustomizableSshSessionFactoryCommand - Since:
- 1.9
- Author:
- Dominik Bartholdi (imod)
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.maven.scm.command.AbstractCommandlogger
 
- 
 - 
Constructor SummaryConstructors Constructor Description JGitBranchCommand()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ScmResultexecuteBranchCommand(ScmProviderRepository repo, ScmFileSet fileSet, String branch, String message)static Set<String>getShortLocalBranchNames(org.eclipse.jgit.api.Git git)Gets a set of names of the available branches in the given repo.voidsetSshSessionFactorySupplier(BiFunction<GitScmProviderRepository,org.slf4j.Logger,ScmProviderAwareSshdSessionFactory> sshSessionFactorySupplier)Sets a different supplier for the SSH session factory that will be used by this command.- 
Methods inherited from class org.apache.maven.scm.command.branch.AbstractBranchCommandexecuteBranchCommand, executeCommand
 - 
Methods inherited from class org.apache.maven.scm.command.AbstractCommandexecute
 
- 
 
- 
- 
- 
Constructor Detail- 
JGitBranchCommandpublic JGitBranchCommand() 
 
- 
 - 
Method Detail- 
setSshSessionFactorySupplierpublic void setSshSessionFactorySupplier(BiFunction<GitScmProviderRepository,org.slf4j.Logger,ScmProviderAwareSshdSessionFactory> sshSessionFactorySupplier) Description copied from interface:CustomizableSshSessionFactoryCommandSets a different supplier for the SSH session factory that will be used by this command. By default it usesScmProviderAwareSshdSessionFactory.- Specified by:
- setSshSessionFactorySupplierin interface- CustomizableSshSessionFactoryCommand
- Parameters:
- sshSessionFactorySupplier- a function that takes a GitScmProviderRepository and Logger and returns a ScmProviderAwareSshdSessionFactory
 
 - 
executeBranchCommandprotected ScmResult executeBranchCommand(ScmProviderRepository repo, ScmFileSet fileSet, String branch, String message) throws ScmException - Specified by:
- executeBranchCommandin class- AbstractBranchCommand
- Throws:
- ScmException
 
 - 
getShortLocalBranchNamespublic static Set<String> getShortLocalBranchNames(org.eclipse.jgit.api.Git git) throws org.eclipse.jgit.api.errors.GitAPIException Gets a set of names of the available branches in the given repo.- Parameters:
- git- the repo to list the branches for
- Returns:
- set of short branch names
- Throws:
- org.eclipse.jgit.api.errors.GitAPIException
 
 
- 
 
-