public class RenameBranchCommand extends GitCommand<Ref>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
newName |
private java.lang.String |
oldName |
repo| Modifier | Constructor and Description |
|---|---|
protected |
RenameBranchCommand(Repository repo)
Constructor for RenameBranchCommand.
|
| Modifier and Type | Method and Description |
|---|---|
Ref |
call() |
RenameBranchCommand |
setNewName(java.lang.String newName)
Set the new name of the branch
|
RenameBranchCommand |
setOldName(java.lang.String oldName)
Set the old name of the branch
|
checkCallable, getRepository, setCallableprotected RenameBranchCommand(Repository repo)
Constructor for RenameBranchCommand.
repo - the Repositorypublic Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException, RefAlreadyExistsException, DetachedHeadException
Execute the command
call in interface java.util.concurrent.Callable<Ref>call in class GitCommand<Ref>GitAPIExceptionRefNotFoundExceptionInvalidRefNameExceptionRefAlreadyExistsExceptionDetachedHeadExceptionpublic RenameBranchCommand setNewName(java.lang.String newName)
newName - the new namepublic RenameBranchCommand setOldName(java.lang.String oldName)
oldName - the name of the branch to rename; if not set, the currently
checked out branch (if any) will be renamed