public class StrategyOneSided extends MergeStrategy
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.
OURS, RECURSIVE, RESOLVE, SIMPLE_TWO_WAY_IN_CORE, THEIRS
Modifier | Constructor and Description |
---|---|
protected |
StrategyOneSided(String name,
int index)
Create a new merge strategy to select a specific input tree.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Get default name of this strategy implementation.
|
Merger |
newMerger(ObjectInserter inserter,
Config config)
Create a new merge instance.
|
Merger |
newMerger(Repository db)
Create a new merge instance.
|
Merger |
newMerger(Repository db,
boolean inCore)
Create a new merge instance.
|
get, get, register, register
protected StrategyOneSided(String name, int index)
name
- name of this strategy.index
- the position of the input tree to accept as the result.public String getName()
getName
in class MergeStrategy
public Merger newMerger(Repository db)
newMerger
in class MergeStrategy
db
- repository database the merger will read from, and eventually
write results back to.public Merger newMerger(Repository db, boolean inCore)
newMerger
in class MergeStrategy
db
- repository database the merger will read from, and eventually
write results back to.inCore
- 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.public Merger newMerger(ObjectInserter inserter, Config config)
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.
newMerger
in class MergeStrategy
inserter
- inserter to write results back to.config
- repo config for reading diff algorithm settings.Copyright © 2019 Eclipse JGit Project. All rights reserved.