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.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
protected void processOptions() throws org.eclipse.jgit.api.errors.InvalidRefNameException, org.eclipse.jgit.api.errors.RefAlreadyExistsException, IOException
org.eclipse.jgit.api.errors.InvalidRefNameException
org.eclipse.jgit.api.errors.RefAlreadyExistsException
IOException
protected 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.GitAPIException
org.eclipse.jgit.api.errors.RefNotFoundException
org.eclipse.jgit.api.errors.CheckoutConflictException
IOException
protected org.eclipse.jgit.lib.ObjectId getStartPoint() throws org.eclipse.jgit.api.errors.RefNotFoundException, IOException
org.eclipse.jgit.api.errors.RefNotFoundException
IOException
protected 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.GitAPIException
org.eclipse.jgit.api.errors.CheckoutConflictException
IOException
protected 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.GitAPIException
org.eclipse.jgit.api.errors.CheckoutConflictException
IOException
Copyright © 2015–2022 SciJava. All rights reserved.