public class RenameBranchCommand extends GitCommand<Ref>
repo| Modifier | Constructor and Description |
|---|---|
protected |
RenameBranchCommand(Repository repo)
Constructor for RenameBranchCommand.
|
| Modifier and Type | Method and Description |
|---|---|
Ref |
call() |
RenameBranchCommand |
setNewName(String newName)
Set the new name of the branch
|
RenameBranchCommand |
setOldName(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 Callable<Ref>call in class GitCommand<Ref>GitAPIExceptionRefNotFoundExceptionInvalidRefNameExceptionRefAlreadyExistsExceptionDetachedHeadExceptionpublic RenameBranchCommand setNewName(String newName)
newName - the new namepublic RenameBranchCommand setOldName(String oldName)
oldName - the name of the branch to rename; if not set, the currently
checked out branch (if any) will be renamedCopyright © 2018 Eclipse JGit Project. All rights reserved.