Package org.eclipse.jgit.notes
Class NoteMapMerger
- java.lang.Object
-
- org.eclipse.jgit.notes.NoteMapMerger
-
public class NoteMapMerger extends Object
Three-way note tree merge.Direct implementation of NoteMap merger without using
TreeWalk
andAbstractTreeIterator
-
-
Constructor Summary
Constructors Constructor Description NoteMapMerger(Repository db)
Constructs a NoteMapMerger withDefaultNoteMerger
as the merger for notes and theMergeStrategy.RESOLVE
as the strategy for resolving conflicts on non-notesNoteMapMerger(Repository db, NoteMerger noteMerger, MergeStrategy nonNotesMergeStrategy)
Constructs a NoteMapMerger with customNoteMerger
and customMergeStrategy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteMap
merge(NoteMap base, NoteMap ours, NoteMap theirs)
Performs the merge.
-
-
-
Constructor Detail
-
NoteMapMerger
public NoteMapMerger(Repository db, NoteMerger noteMerger, MergeStrategy nonNotesMergeStrategy)
Constructs a NoteMapMerger with customNoteMerger
and customMergeStrategy
.- Parameters:
db
- Git repositorynoteMerger
- note merger for merging conflicting changes on a notenonNotesMergeStrategy
- merge strategy for merging non-note entries
-
NoteMapMerger
public NoteMapMerger(Repository db)
Constructs a NoteMapMerger withDefaultNoteMerger
as the merger for notes and theMergeStrategy.RESOLVE
as the strategy for resolving conflicts on non-notes- Parameters:
db
- Git repository
-
-
Method Detail
-
merge
public NoteMap merge(NoteMap base, NoteMap ours, NoteMap theirs) throws IOException
Performs the merge.- Parameters:
base
- base version of the note treeours
- ours version of the note treetheirs
- theirs version of the note tree- Returns:
- merge result as a new NoteMap
- Throws:
IOException
-
-