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) |
| Modifier and Type | Method and Description |
|---|---|
List<Ref> |
call()
Executes the command
|
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) |
checkCallable, getRepository, setCallableprotected ListBranchCommand(Repository repo)
repo - public List<Ref> call() throws GitAPIException
GitCommandcall in interface Callable<List<Ref>>call in class GitCommand<List<Ref>>GitAPIException - or subclass thereof when an error occurspublic 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 © 2014. All rights reserved.