Package org.eclipse.jgit.merge
Class StrategyOneSided.OneSide
- java.lang.Object
-
- org.eclipse.jgit.merge.Merger
-
- org.eclipse.jgit.merge.StrategyOneSided.OneSide
-
- Enclosing class:
- StrategyOneSided
static class StrategyOneSided.OneSide extends Merger
-
-
Field Summary
Fields Modifier and Type Field Description private int
treeIndex
-
Fields inherited from class org.eclipse.jgit.merge.Merger
db, monitor, reader, sourceCommits, sourceObjects, sourceTrees, walk
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OneSide(ObjectInserter inserter, int index)
protected
OneSide(Repository local, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectId
getBaseCommitId()
Get the ID of the commit that was used as merge base for mergingObjectId
getResultTreeId()
Get resulting tree.protected boolean
mergeImpl()
Execute the merge.-
Methods inherited from class org.eclipse.jgit.merge.Merger
getBaseCommit, getObjectInserter, getRepository, merge, merge, nonNullRepo, openTree, setObjectInserter, setProgressMonitor
-
-
-
-
Constructor Detail
-
OneSide
protected OneSide(Repository local, int index)
-
OneSide
protected OneSide(ObjectInserter inserter, int index)
-
-
Method Detail
-
mergeImpl
protected boolean mergeImpl() throws java.io.IOException
Description copied from class:Merger
Execute the merge.This method is called from
Merger.merge(AnyObjectId[])
after theMerger.sourceObjects
,Merger.sourceCommits
andMerger.sourceTrees
have been populated.- Specified by:
mergeImpl
in classMerger
- 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.
- Throws:
IncorrectObjectTypeException
- one of the input objects is not a commit, but the strategy requires it to be a commit.java.io.IOException
- one or more sources could not be read, or outputs could not be written to the Repository.
-
getResultTreeId
public ObjectId getResultTreeId()
Description copied from class:Merger
Get resulting tree.- Specified by:
getResultTreeId
in classMerger
- Returns:
- resulting tree, if
Merger.merge(AnyObjectId[])
returned true.
-
getBaseCommitId
public ObjectId getBaseCommitId()
Description copied from class:Merger
Get the ID of the commit that was used as merge base for merging- Specified by:
getBaseCommitId
in classMerger
- 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 manually
-
-