org.eclipse.jgit.merge.MergeStrategy for a
single org.eclipse.jgit.lib.Repository .
| Modifier and Type | Field and Description |
|---|---|
| protected final Repository | db
The repository this merger operates on. |
| private ObjectInserter | |
| protected ProgressMonitor | monitor
A progress monitor. |
| protected ObjectReader | |
| protected RevCommit[] | sourceCommits
If |
| protected RevObject[] | sourceObjects
The original objects supplied in the merge; this can be any tree-ish. |
| protected RevTree[] | sourceTrees
The trees matching every entry in |
| protected RevWalk | walk
A RevWalk for computing merge bases, or listing incoming commits. |
| Access | Constructor and Description |
|---|---|
| protected | Merger(Repository
the repository this merger will read and write data on. local)Create a new merge instance for a repository. |
| protected | Merger(ObjectInserter
the inserter to write objects to. Will be closed at the
conclusion of oi)merge, unless flush is false.Create a new in-core merge instance from an inserter. |
| Modifier and Type | Method and Description |
|---|---|
| protected RevCommit | Returns: the merge base of two commitsthe first commit in a, RevCommit sourceObjects.the second commit in b)sourceObjects.Return the merge base of two commits. |
| public abstract ObjectId | Returns: the ID of the commit that was used as merge base for merging, or null if no merge base was used or it was set manuallyGet the ID of the commit that was used as merge base for merging |
| public ObjectInserter | Returns: an object writer to create objects, writing objects togetRepository() (if a repository was provided).Get an object writer to create objects, writing objects to
|
| public Repository | Returns: the repository this merger operates on.Get the repository this merger operates on. |
| public abstract ObjectId | |
| public boolean | Returns: true if the merge was completed without conflicts; false if the merge strategy cannot handle this merge or there were conflicts preventing it from automatically resolving all paths.source trees to be combined together. The merge base is not
included in this set. tips)Merge together two or more tree-ish objects. |
| public boolean | Returns: true if the merge was completed without conflicts; false if the merge strategy cannot handle this merge or there were conflicts preventing it from automatically resolving all paths.whether to flush and close the underlying object inserter when
finished to store any content-merged blobs and virtual merged
bases; if false, callers are responsible for flushing. flush, AnyObjectId... source trees to be combined together. The merge base is not
included in this set. tips)Merge together two or more tree-ish objects. |
| protected abstract boolean | Returns: true if the merge was completed without conflicts; false if the merge strategy cannot handle this merge or there were conflicts preventing it from automatically resolving all paths.Execute the merge. |
| protected Repository | |
| protected AbstractTreeIterator | Returns: an iterator for the tree.the tree to scan; must be a tree (not a treeish). treeId)Open an iterator over a tree. |
| public void | setObjectInserter(ObjectInserter
the inserter instance to use. Must be associated with the
repository instance returned by oi)getRepository() (if a
repository was provided). Will be closed at the conclusion of
merge, unless flush is false.Set the inserter this merger will use to create objects. |
| public void | setProgressMonitor(ProgressMonitor
Monitor to use, can be null to indicate no progress reporting
is desired. monitor)Set a progress monitor. |
| db | back to summary |
|---|---|
| protected final Repository db The repository this merger operates on.
Null if and only if the merger was constructed with | |
| inserter | back to summary |
|---|---|
| private ObjectInserter inserter | |
| monitor | back to summary |
|---|---|
| protected ProgressMonitor monitor A progress monitor.
| |
| reader | back to summary |
|---|---|
| protected ObjectReader reader Reader to support | |
| sourceCommits | back to summary |
|---|---|
| protected RevCommit[] sourceCommits If | |
| sourceObjects | back to summary |
|---|---|
| protected RevObject[] sourceObjects The original objects supplied in the merge; this can be any tree-ish. | |
| sourceTrees | back to summary |
|---|---|
| protected RevTree[] sourceTrees The trees matching every entry in | |
| walk | back to summary |
|---|---|
| protected RevWalk walk A RevWalk for computing merge bases, or listing incoming commits. | |
| Merger | back to summary |
|---|---|
| protected Merger(Repository local) Create a new merge instance for a repository.
| |
| Merger | back to summary |
|---|---|
| protected Merger(ObjectInserter oi) Create a new in-core merge instance from an inserter.
| |
| getBaseCommit | back to summary |
|---|---|
| protected RevCommit getBaseCommit(RevCommit a, RevCommit b) throws IncorrectObjectTypeException, IOException Return the merge base of two commits.
| |
| getBaseCommitId | back to summary |
|---|---|
| public abstract ObjectId getBaseCommitId() Get the ID of the commit that was used as merge base for merging
| |
| getObjectInserter | back to summary |
|---|---|
| public ObjectInserter getObjectInserter() Get an object writer to create objects, writing objects to
| |
| getRepository | back to summary |
|---|---|
| public Repository getRepository() Get the repository this merger operates on.
| |
| getResultTreeId | back to summary |
|---|---|
| public abstract ObjectId getResultTreeId() Get resulting tree.
| |
| merge | back to summary |
|---|---|
| public boolean merge(AnyObjectId... tips) throws IOException Merge together two or more tree-ish objects. Any tree-ish may be supplied as inputs. Commits and/or tags pointing at trees or commits may be passed as input objects.
| |
| merge | back to summary |
|---|---|
| public boolean merge(boolean flush, AnyObjectId... tips) throws IOException Merge together two or more tree-ish objects. Any tree-ish may be supplied as inputs. Commits and/or tags pointing at trees or commits may be passed as input objects.
| |
| mergeImpl | back to summary |
|---|---|
| protected abstract boolean mergeImpl() throws IOException Execute the merge.
This method is called from
| |
| nonNullRepo | back to summary |
|---|---|
| protected Repository nonNullRepo() Get non-null repository instance
| |
| openTree | back to summary |
|---|---|
| protected AbstractTreeIterator openTree(AnyObjectId treeId) throws IncorrectObjectTypeException, IOException Open an iterator over a tree.
| |
| setObjectInserter | back to summary |
|---|---|
| public void setObjectInserter(ObjectInserter oi) Set the inserter this merger will use to create objects.
If an inserter was already set on this instance (such as by a prior set,
or a prior call to
| |
| setProgressMonitor | back to summary |
|---|---|
| public void setProgressMonitor(ProgressMonitor monitor) Set a progress monitor.
| |