The strategy chooses a path from one of the two input trees if the path is unchanged in the other relative to their common merge base tree. This is a trivial 3-way merge (at the file path level only).
Modifications of the same file path (content and/or file mode) by both input trees will cause a merge conflict, as this strategy does not attempt to merge file contents.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | getName()
Implements abstract org. Get default name of this strategy implementation. |
| public ThreeWayMerger | 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 ThreeWayMerger | 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 ThreeWayMerger | 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. |
| StrategySimpleTwoWayInCore | back to summary |
|---|---|
| protected StrategySimpleTwoWayInCore() Create a new instance of the strategy. | |
| 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 ThreeWayMerger newMerger(Repository db) Implements abstract org. Doc from org. Create a new merge instance.
| |
| newMerger | back to summary |
|---|---|
| public ThreeWayMerger newMerger(Repository db, boolean inCore) Implements abstract org. Doc from org. Create a new merge instance.
| |
| newMerger | back to summary |
|---|---|
| public ThreeWayMerger 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 DirCacheBuilder | |
| private final DirCache | |
| private ObjectId | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final NameConflictTreeWalk |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public ObjectId | getResultTreeId()
Implements abstract org. Get resulting tree. |
| private AbstractTreeIterator | |
| protected boolean | |
| private static boolean |
| builder | back to summary |
|---|---|
| private DirCacheBuilder builder | |
| cache | back to summary |
|---|---|
| private final DirCache cache | |
| resultTree | back to summary |
|---|---|
| private ObjectId resultTree | |
| T_BASE | back to summary |
|---|---|
| private static final int T_BASE | |
| T_OURS | back to summary |
|---|---|
| private static final int T_OURS | |
| T_THEIRS | back to summary |
|---|---|
| private static final int T_THEIRS | |
| tw | back to summary |
|---|---|
| private final NameConflictTreeWalk tw | |
| InCoreMerger | back to summary |
|---|---|
| pack-priv InCoreMerger(Repository local) | |
| InCoreMerger | back to summary |
|---|---|
| pack-priv InCoreMerger(ObjectInserter inserter) | |
| add | back to summary |
|---|---|
| private void add(int tree, int stage) throws IOException | |
| getResultTreeId | back to summary |
|---|---|
| public ObjectId getResultTreeId() Implements abstract org. Doc from org. Get resulting tree.
| |
| getTree | back to summary |
|---|---|
| private AbstractTreeIterator getTree(int tree) | |
| mergeImpl | back to summary |
|---|---|
| protected boolean mergeImpl() throws IOException Implements abstract org. Doc from org. Execute the merge.
This method is called from
| |
| nonTree | back to summary |
|---|---|
| private static boolean nonTree(int mode) | |