|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.api.GitCommand<Ref>
org.eclipse.jgit.api.RenameBranchCommand
public class RenameBranchCommand
Used to rename branches.
Field Summary |
---|
Fields inherited from class org.eclipse.jgit.api.GitCommand |
---|
repo |
Constructor Summary | |
---|---|
protected |
RenameBranchCommand(Repository repo)
|
Method Summary | |
---|---|
Ref |
call()
Executes the command |
RenameBranchCommand |
setNewName(java.lang.String newName)
|
RenameBranchCommand |
setOldName(java.lang.String oldName)
|
Methods inherited from class org.eclipse.jgit.api.GitCommand |
---|
checkCallable, getRepository, setCallable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RenameBranchCommand(Repository repo)
repo
- Method Detail |
---|
public Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException, RefAlreadyExistsException, DetachedHeadException
GitCommand
call
in interface java.util.concurrent.Callable<Ref>
call
in class GitCommand<Ref>
RefNotFoundException
- if the old branch can not be found (branch with provided old
name does not exist or old name resolves to a tag)
InvalidRefNameException
- if the provided new name is null
or otherwise
invalid
RefAlreadyExistsException
- if a branch with the new name already exists
DetachedHeadException
- if rename is tried without specifying the old name and HEAD
is detached
GitAPIException
- or subclass thereof when an error occurspublic RenameBranchCommand setNewName(java.lang.String newName)
newName
- the new name
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |