This strategy can be used to cauterize an entire side branch of history, by setting the output tree to one of the inputs, and ignoring any of the paths of the other inputs.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final int |
| Access | Constructor and Description |
|---|---|
| protected | StrategyOneSided(String
name of this strategy. name, int the position of the input tree to accept as the result. index)Create a new merge strategy to select a specific input tree. |
| Modifier and Type | Method and Description |
|---|---|
| public String | getName()
Implements abstract org. Get default name of this strategy implementation. |
| public Merger | newMerger(Repository
repository database the merger will read from, and eventually
write results back to. db)Implements abstract org. Create a new merge instance. |
| public Merger | newMerger(Repository
repository database the merger will read from, and eventually
write results back to. db, boolean the merge will happen in memory, working folder will not be
modified, in case of a non-trivial merge that requires manual
resolution, the merger will fail. inCore)Implements abstract org. Create a new merge instance. |
| public Merger | newMerger(ObjectInserter
inserter to write results back to. inserter, Config repo config for reading diff algorithm settings. config)Implements abstract org. Create a new merge instance. |
| strategyName | back to summary |
|---|---|
| private final String strategyName | |
| treeIndex | back to summary |
|---|---|
| private final int treeIndex | |
| StrategyOneSided | back to summary |
|---|---|
| protected StrategyOneSided(String name, int index) Create a new merge strategy to select a specific input tree.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. Get default name of this strategy implementation. | |
| newMerger | back to summary |
|---|---|
| public Merger newMerger(Repository db) Implements abstract org. Doc from org. Create a new merge instance.
| |
| newMerger | back to summary |
|---|---|
| public Merger newMerger(Repository db, boolean inCore) Implements abstract org. Doc from org. Create a new merge instance.
| |
| newMerger | back to summary |
|---|---|
| public Merger newMerger(ObjectInserter inserter, Config config) Implements abstract org. Doc from org. Create a new merge instance. The merge will happen in memory, working folder will not be modified, in case of a non-trivial merge that requires manual resolution, the merger will fail.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public ObjectId | getBaseCommitId()
Implements abstract org. Get the ID of the commit that was used as merge base for merging |
| public ObjectId | getResultTreeId()
Implements abstract org. Get resulting tree. |
| protected boolean |
| treeIndex | back to summary |
|---|---|
| private final int treeIndex | |
| OneSide | back to summary |
|---|---|
| protected OneSide(Repository local, int index) | |
| OneSide | back to summary |
|---|---|
| protected OneSide(ObjectInserter inserter, int index) | |
| getBaseCommitId | back to summary |
|---|---|
| public ObjectId getBaseCommitId() Implements abstract org. Doc from org. Get the ID of the commit that was used as merge base for merging | |
| getResultTreeId | back to summary |
|---|---|
| public ObjectId getResultTreeId() Implements abstract org. Doc from org. Get resulting tree.
| |
| mergeImpl | back to summary |
|---|---|
| protected boolean mergeImpl() throws IOException Implements abstract org. Doc from org. Execute the merge.
This method is called from
| |