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())
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private ContentMergeStrategy | |
| private Integer | |
| private CherryPickCommitMessageProvider | |
| private ProgressMonitor | |
| private boolean | |
| private String | |
| private String | |
| private MergeStrategy |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public CherryPickResult | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| private RevCommit | |
| public CherryPickCommand | |
| public CherryPickCommand | Returns: thisthe Id of a commit which is cherry-picked to the current head commit)Include a commit |
| public CherryPickCommand | Returns: thisa name given to the commit name, AnyObjectId the Id of a commit which is cherry-picked to the current head commit)Include a commit |
| public CherryPickCommand | Returns: thisthe commit message provider messageProvider)Set a message provider for a target cherry-picked commit
By default original commit message is used (see
|
| public CherryPickCommand | Returns: thisthe strategy)ContentMergeStrategy to be usedSets the content merge strategy to use if the
|
| public CherryPickCommand | Returns: thisthe (1-based) parent number to diff against. This allows
cherry-picking of merges. mainlineParentNumber)Set the (1-based) parent number to diff against |
| public CherryPickCommand | Returns: thistrue to cherry-pick without committing, false to commit after
each pick (default) noCommit)Allows cherry-picking changes without committing them. |
| public CherryPickCommand | Returns: thisthe name that should be used in the "OURS" place for conflict
markers ourCommitName)Set the name that should be used in the "OURS" place for conflict markers |
| public CherryPickCommand | Returns: thisThe progress monitor associated with the cherry-pick operation. |
| public CherryPickCommand | |
| public CherryPickCommand | Returns: thisThe merge strategy to use during this Cherry-pick. strategy)Set the |
| public String |
| commits | back to summary |
|---|---|
| private List<Ref> commits | |
| contentStrategy | back to summary |
|---|---|
| private ContentMergeStrategy contentStrategy | |
| mainlineParentNumber | back to summary |
|---|---|
| private Integer mainlineParentNumber | |
| messageProvider | back to summary |
|---|---|
| private CherryPickCommitMessageProvider messageProvider | |
| monitor | back to summary |
|---|---|
| private ProgressMonitor monitor | |
| noCommit | back to summary |
|---|---|
| private boolean noCommit | |
| ourCommitName | back to summary |
|---|---|
| private String ourCommitName | |
| reflogPrefix | back to summary |
|---|---|
| private String reflogPrefix | |
| strategy | back to summary |
|---|---|
| private MergeStrategy strategy | |
| CherryPickCommand | back to summary |
|---|---|
| protected CherryPickCommand(Repository repo) Constructor for CherryPickCommand
| |
| calculateOurName | back to summary |
|---|---|
| private String calculateOurName(Ref headRef) | |
| call | back to summary |
|---|---|
| public CherryPickResult call() throws GitAPIException, NoMessageException, UnmergedPathsException, ConcurrentRefUpdateException, WrongRepositoryStateException, NoHeadException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
Executes the
| |
| getParentCommit | back to summary |
|---|---|
| private RevCommit getParentCommit(RevCommit srcCommit, RevWalk revWalk) throws MultipleParentsNotAllowedException, MissingObjectException, IOException | |
| include | back to summary |
|---|---|
| public CherryPickCommand include(Ref commit) Include a reference to a commit
| |
| include | back to summary |
|---|---|
| public CherryPickCommand include(AnyObjectId commit) Include a commit
| |
| include | back to summary |
|---|---|
| public CherryPickCommand include(String name, AnyObjectId commit) Include a commit
| |
| setCherryPickCommitMessageProvider | back to summary |
|---|---|
| public CherryPickCommand setCherryPickCommitMessageProvider(CherryPickCommitMessageProvider messageProvider) Set a message provider for a target cherry-picked commit
| |
| setContentMergeStrategy | back to summary |
|---|---|
| public CherryPickCommand setContentMergeStrategy(ContentMergeStrategy strategy) Sets the content merge strategy to use if the
| |
| setMainlineParentNumber | back to summary |
|---|---|
| public CherryPickCommand setMainlineParentNumber(int mainlineParentNumber) Set the (1-based) parent number to diff against
| |
| setNoCommit | back to summary |
|---|---|
| public CherryPickCommand setNoCommit(boolean noCommit) Allows cherry-picking changes without committing them. Note The behavior of cherry-pick is undefined if you pick multiple commits or if HEAD does not match the index state before cherry-picking.
| |
| setOurCommitName | back to summary |
|---|---|
| public CherryPickCommand setOurCommitName(String ourCommitName) Set the name that should be used in the "OURS" place for conflict markers
| |
| setProgressMonitor | back to summary |
|---|---|
| public CherryPickCommand setProgressMonitor(ProgressMonitor monitor) The progress monitor associated with the cherry-pick operation. By
default, this is set to
| |
| setReflogPrefix | back to summary |
|---|---|
| public CherryPickCommand setReflogPrefix(String prefix) Set the prefix to use in the reflog. This is primarily needed for implementing rebase in terms of cherry-picking
| |
| setStrategy | back to summary |
|---|---|
| public CherryPickCommand setStrategy(MergeStrategy strategy) Set the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |