Class NoteMapMerger

    • Constructor Detail

      • NoteMapMerger

        public NoteMapMerger​(Repository db,
                             NoteMerger noteMerger,
                             MergeStrategy nonNotesMergeStrategy)
        Constructs a NoteMapMerger with custom NoteMerger and custom MergeStrategy.
        Parameters:
        db - Git repository
        noteMerger - note merger for merging conflicting changes on a note
        nonNotesMergeStrategy - merge strategy for merging non-note entries
      • NoteMapMerger

        public NoteMapMerger​(Repository db)
        Constructs a NoteMapMerger with DefaultNoteMerger as the merger for notes and the MergeStrategy.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 tree
        ours - ours version of the note tree
        theirs - theirs version of the note tree
        Returns:
        merge result as a new NoteMap
        Throws:
        IOException