| Modifier and Type | Class and Description |
|---|---|
| public static enum | CreateBranchCommand.
The modes available for setting up the upstream configuration (corresponding to the --set-upstream, --track, --no-track options |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private String | |
| private RevCommit | |
| private String | |
| private CreateBranchCommand. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Ref | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| private ObjectId | |
| private String | |
| public static boolean | Returns: true if the branch name is validbranch name to check branchName)Check if the given branch name is valid |
| private void | |
| public CreateBranchCommand | Returns: this instanceif force)true and the branch with the given name
already exists, the start-point of an existing branch will be
set to a new start-point; if false, the existing branch will
not be changedSet whether to create the branch forcefully |
| public CreateBranchCommand | |
| public CreateBranchCommand | Returns: this instancecorresponds to the start-point option; if startPoint)null,
the current HEAD will be usedSet the start point |
| public CreateBranchCommand | Returns: this instancecorresponds to the start-point option; if startPoint)null,
the current HEAD will be usedSet the start point |
| public CreateBranchCommand | Returns: this instancecorresponds to the --track/--no-track/--set-upstream options;
may be modenullSet the upstream mode |
| force | back to summary |
|---|---|
| private boolean force | |
| name | back to summary |
|---|---|
| private String name | |
| startCommit | back to summary |
|---|---|
| private RevCommit startCommit | |
| startPoint | back to summary |
|---|---|
| private String startPoint | |
| upstreamMode | back to summary |
|---|---|
| private CreateBranchCommand. | |
| CreateBranchCommand | back to summary |
|---|---|
| protected CreateBranchCommand(Repository repo) Constructor for CreateBranchCommand
| |
| call | back to summary |
|---|---|
| public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
| |
| getStartPointObjectId | back to summary |
|---|---|
| private ObjectId getStartPointObjectId() throws AmbiguousObjectException, RefNotFoundException, IOException | |
| getStartPointOrHead | back to summary |
|---|---|
| private String getStartPointOrHead() | |
| isValidBranchName | back to summary |
|---|---|
| public static boolean isValidBranchName(String branchName) Check if the given branch name is valid
| |
| processOptions | back to summary |
|---|---|
| private void processOptions() throws InvalidRefNameException | |
| setForce | back to summary |
|---|---|
| public CreateBranchCommand setForce(boolean force) Set whether to create the branch forcefully
| |
| setName | back to summary |
|---|---|
| public CreateBranchCommand setName(String name) Set the name of the new branch
| |
| setStartPoint | back to summary |
|---|---|
| public CreateBranchCommand setStartPoint(String startPoint) Set the start point
| |
| setStartPoint | back to summary |
|---|---|
| public CreateBranchCommand setStartPoint(RevCommit startPoint) Set the start point
| |
| setUpstreamMode | back to summary |
|---|---|
| public CreateBranchCommand setUpstreamMode(CreateBranchCommand. Set the upstream mode
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final CreateBranchCommand. | NOTRACK
Corresponds to the --no-track option |
| public static final CreateBranchCommand. | SET_UPSTREAM
Corresponds to the --set-upstream option |
| public static final CreateBranchCommand. | TRACK
Corresponds to the --track option |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CreateBranchCommand. | |
| public static CreateBranchCommand. |
| NOTRACK | back to summary |
|---|---|
| public static final CreateBranchCommand. Corresponds to the --no-track option | |
| SET_UPSTREAM | back to summary |
|---|---|
| public static final CreateBranchCommand. Corresponds to the --set-upstream option | |
| TRACK | back to summary |
|---|---|
| public static final CreateBranchCommand. Corresponds to the --track option | |
| SetupUpstreamMode | back to summary |
|---|---|
| private SetupUpstreamMode() | |
| valueOf | back to summary |
|---|---|
| public static CreateBranchCommand. | |
| values | back to summary |
|---|---|
| public static CreateBranchCommand. | |