public class CherryPickCommand extends GitCommand<CherryPickResult>
cherry-pick
command. It has setters for all
supported options and arguments of this command and a call()
method
to finally execute the command. Each instance of this class should only be
used for one invocation of the command (means: one call to call()
)repo
Modifier | Constructor and Description |
---|---|
protected |
CherryPickCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
CherryPickResult |
call()
Executes the
Cherry-Pick command with all the options and
parameters collected by the setter methods (e.g. |
CherryPickCommand |
include(AnyObjectId commit) |
CherryPickCommand |
include(Ref commit) |
CherryPickCommand |
include(String name,
AnyObjectId commit) |
CherryPickCommand |
setOurCommitName(String ourCommitName) |
checkCallable, getRepository, setCallable
protected CherryPickCommand(Repository repo)
repo
- public CherryPickResult call() throws GitAPIException, NoMessageException, UnmergedPathsException, ConcurrentRefUpdateException, WrongRepositoryStateException, NoHeadException
Cherry-Pick
command with all the options and
parameters collected by the setter methods (e.g. include(Ref)
of
this class. Each instance of this class should only be used for one
invocation of the command. Don't call this method twice on an instance.call
in interface Callable<CherryPickResult>
call
in class GitCommand<CherryPickResult>
GitAPIException
WrongRepositoryStateException
ConcurrentRefUpdateException
UnmergedPathsException
NoMessageException
NoHeadException
public CherryPickCommand include(Ref commit)
commit
- a reference to a commit which is cherry-picked to the current
headthis
public CherryPickCommand include(AnyObjectId commit)
commit
- the Id of a commit which is cherry-picked to the current headthis
public CherryPickCommand include(String name, AnyObjectId commit)
name
- a name given to the commitcommit
- the Id of a commit which is cherry-picked to the current headthis
public CherryPickCommand setOurCommitName(String ourCommitName)
ourCommitName
- the name that should be used in the "OURS" place for conflict
markersthis
Copyright © 2013. All Rights Reserved.