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, setCallable
protected RenameBranchCommand(Repository repo)
Constructor for RenameBranchCommand.
repo
- the Repository
public Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException, RefAlreadyExistsException, DetachedHeadException
Execute the command
call
in interface Callable<Ref>
call
in class GitCommand<Ref>
GitAPIException
RefNotFoundException
InvalidRefNameException
RefAlreadyExistsException
DetachedHeadException
public 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.