public class ListBranchCommand extends GitCommand<List<Ref>>
In case HEAD is detached (it points directly to a commit), it is also returned in the results.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ListBranchCommand.ListMode
The modes available for listing branches (corresponding to the -r and -a
 options) 
 | 
repo| Modifier | Constructor and Description | 
|---|---|
protected  | 
ListBranchCommand(Repository repo)
Constructor for ListBranchCommand. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
List<Ref> | 
call() | 
ListBranchCommand | 
setContains(String containsCommitish)
If this is set, only the branches that contain the specified commit-ish
 as an ancestor are returned. 
 | 
ListBranchCommand | 
setListMode(ListBranchCommand.ListMode listMode)
Set the list mode 
 | 
checkCallable, getRepository, setCallableprotected ListBranchCommand(Repository repo)
repo - a Repository object.public List<Ref> call() throws GitAPIException
Execute the command
call in interface Callable<List<Ref>>call in class GitCommand<List<Ref>>GitAPIExceptionpublic ListBranchCommand setListMode(ListBranchCommand.ListMode listMode)
listMode - optional: corresponds to the -r/-a options; by default, only
            local branches will be listedpublic ListBranchCommand setContains(String containsCommitish)
containsCommitish - a commit ID or ref nameCopyright © 2018 Eclipse JGit Project. All rights reserved.