public class CreateOrphanBranchCommand
extends org.eclipse.jgit.api.GitCommand<org.eclipse.jgit.lib.Ref>
NB: Slightly modified from https://gist.github.com/taichi/3097455 as this code was not available in any jgit release.
| Constructor and Description |
|---|
CreateOrphanBranchCommand(org.eclipse.jgit.lib.Repository repository) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jgit.lib.Ref |
call() |
protected void |
checkout(org.eclipse.jgit.lib.ObjectId fromId) |
protected void |
checkout(org.eclipse.jgit.revwalk.RevTree headTree,
org.eclipse.jgit.revwalk.RevTree fromTree) |
protected void |
checkoutStartPoint() |
protected String |
getBranchName() |
List<String> |
getConflicts() |
protected org.eclipse.jgit.lib.ObjectId |
getStartPoint() |
List<String> |
getToBeDeleted() |
protected void |
processOptions() |
CreateOrphanBranchCommand |
setName(String name) |
CreateOrphanBranchCommand |
setStartPoint(org.eclipse.jgit.revwalk.RevCommit startPoint) |
CreateOrphanBranchCommand |
setStartPoint(String startPoint) |
public CreateOrphanBranchCommand(org.eclipse.jgit.lib.Repository repository)
public CreateOrphanBranchCommand setName(String name)
public CreateOrphanBranchCommand setStartPoint(String startPoint)
public CreateOrphanBranchCommand setStartPoint(org.eclipse.jgit.revwalk.RevCommit startPoint)
public org.eclipse.jgit.lib.Ref call()
throws org.eclipse.jgit.api.errors.GitAPIException,
org.eclipse.jgit.api.errors.RefNotFoundException,
org.eclipse.jgit.api.errors.CheckoutConflictException,
org.eclipse.jgit.api.errors.InvalidRefNameException,
org.eclipse.jgit.api.errors.RefAlreadyExistsException
call in interface Callable<org.eclipse.jgit.lib.Ref>call in class org.eclipse.jgit.api.GitCommand<org.eclipse.jgit.lib.Ref>org.eclipse.jgit.api.errors.GitAPIExceptionorg.eclipse.jgit.api.errors.RefNotFoundExceptionorg.eclipse.jgit.api.errors.CheckoutConflictExceptionorg.eclipse.jgit.api.errors.InvalidRefNameExceptionorg.eclipse.jgit.api.errors.RefAlreadyExistsExceptionprotected void processOptions()
throws org.eclipse.jgit.api.errors.InvalidRefNameException,
org.eclipse.jgit.api.errors.RefAlreadyExistsException,
IOException
org.eclipse.jgit.api.errors.InvalidRefNameExceptionorg.eclipse.jgit.api.errors.RefAlreadyExistsExceptionIOExceptionprotected String getBranchName()
protected void checkoutStartPoint()
throws org.eclipse.jgit.api.errors.GitAPIException,
org.eclipse.jgit.api.errors.RefNotFoundException,
org.eclipse.jgit.api.errors.CheckoutConflictException,
IOException
org.eclipse.jgit.api.errors.GitAPIExceptionorg.eclipse.jgit.api.errors.RefNotFoundExceptionorg.eclipse.jgit.api.errors.CheckoutConflictExceptionIOExceptionprotected org.eclipse.jgit.lib.ObjectId getStartPoint()
throws org.eclipse.jgit.api.errors.RefNotFoundException,
IOException
org.eclipse.jgit.api.errors.RefNotFoundExceptionIOExceptionprotected void checkout(org.eclipse.jgit.lib.ObjectId fromId)
throws org.eclipse.jgit.api.errors.GitAPIException,
org.eclipse.jgit.api.errors.CheckoutConflictException,
IOException
org.eclipse.jgit.api.errors.GitAPIExceptionorg.eclipse.jgit.api.errors.CheckoutConflictExceptionIOExceptionprotected void checkout(org.eclipse.jgit.revwalk.RevTree headTree,
org.eclipse.jgit.revwalk.RevTree fromTree)
throws org.eclipse.jgit.api.errors.GitAPIException,
org.eclipse.jgit.api.errors.CheckoutConflictException,
IOException
org.eclipse.jgit.api.errors.GitAPIExceptionorg.eclipse.jgit.api.errors.CheckoutConflictExceptionIOExceptionCopyright © 2015–2022 SciJava. All rights reserved.