public class RecursiveMerger extends ResolveMerger
ResolveMerger.MergeFailureReason
Modifier and Type | Field and Description |
---|---|
int |
MAX_BASES
The maximum number of merge bases.
|
builder, commitNames, dircache, enterSubtree, failingPaths, implicitDirCache, inCore, mergeAlgorithm, mergeResults, modifiedFiles, resultTree, T_BASE, T_FILE, T_INDEX, T_OURS, T_THEIRS, toBeCheckedOut, toBeDeleted, tw, unmergedPaths, workingTreeIterator, workingTreeOptions
db, monitor, reader, sourceCommits, sourceObjects, sourceTrees, walk
Modifier | Constructor and Description |
---|---|
protected |
RecursiveMerger(ObjectInserter inserter,
Config config)
Normal recursive merge, implies inCore.
|
protected |
RecursiveMerger(Repository local)
Normal recursive merge, implies not inCore
|
protected |
RecursiveMerger(Repository local,
boolean inCore)
Normal recursive merge when you want a choice of DirCache placement
inCore
|
Modifier and Type | Method and Description |
---|---|
protected RevCommit |
getBaseCommit(RevCommit a,
RevCommit b)
Return the merge base of two commits.
|
protected RevCommit |
getBaseCommit(RevCommit a,
RevCommit b,
int callDepth)
Get a single base commit for two given commits.
|
addCheckoutMetadata, addDeletion, addToCheckout, cleanUp, failed, getCommitNames, getFailingPaths, getMergeResults, getModifiedFiles, getResultTreeId, getToBeCheckedOut, getUnmergedPaths, mergeImpl, mergeTrees, mergeTreeWalk, processEntry, setCommitNames, setDirCache, setWorkingTreeIterator
getBaseCommitId, merge, mergeBase, setBase
getObjectInserter, getRepository, merge, nonNullRepo, openTree, setObjectInserter, setProgressMonitor
public final int MAX_BASES
protected RecursiveMerger(Repository local, boolean inCore)
local
- a Repository
object.inCore
- a boolean.protected RecursiveMerger(Repository local)
local
- a Repository
object.protected RecursiveMerger(ObjectInserter inserter, Config config)
inserter
- an ObjectInserter
object.config
- the repository configurationprotected RevCommit getBaseCommit(RevCommit a, RevCommit b) throws IncorrectObjectTypeException, IOException
Get a single base commit for two given commits. If the two source commits have more than one base commit recursively merge the base commits together until you end up with a single base commit.
getBaseCommit
in class Merger
a
- the first commit in Merger.sourceObjects
.b
- the second commit in Merger.sourceObjects
.IncorrectObjectTypeException
- one of the input objects is not a commit.IOException
- objects are missing or multiple merge bases were found.protected RevCommit getBaseCommit(RevCommit a, RevCommit b, int callDepth) throws IOException
a
- the first commit to be mergedb
- the second commit to be mergedcallDepth
- the callDepth when this method is called recursivelyIOException
IncorrectObjectTypeException
- one of the input objects is not a commit.NoMergeBaseException
- too many merge bases are found or the computation of a common
merge base failed (e.g. because of a conflict).Copyright © 2020 Eclipse JGit Project. All rights reserved.