Top Description Constructors Methods
org.eclipse.jgit.notes

public Class DefaultNoteMerger

extends Object
implements NoteMerger
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.notes.NoteMerger
Imports
java.io.IOException, org.eclipse.jgit.lib.Constants, .ObjectId, .ObjectInserter, .ObjectLoader, .ObjectReader, org.eclipse.jgit.util.io.UnionInputStream

Default implementation of the org.eclipse.jgit.notes.NoteMerger.

If ours and theirs are both non-null, which means they are either both edits or both adds, then this merger will simply join the content of ours and theirs (in that order) and return that as the merge result.

If one or ours/theirs is non-null and the other one is null then the non-null value is returned as the merge result. This means that an edit/delete conflict is resolved by keeping the edit version.

If both ours and theirs are null then the result of the merge is also null.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Note
merge(Note
version of the Note
base
,
Note
version of the Note
ours
,
Note
version of the Note
theirs
,
ObjectReader
the object reader that must be used to read Git objects
reader
,
ObjectInserter
the object inserter that must be used to insert Git objects
inserter
)

Implements org.eclipse.jgit.notes.NoteMerger.merge.

Merges the conflicting note changes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultNoteMergerback to summary
public DefaultNoteMerger()

Method Detail

mergeback to summary
public Note merge(Note base, Note ours, Note theirs, ObjectReader reader, ObjectInserter inserter) throws IOException

Implements org.eclipse.jgit.notes.NoteMerger.merge.

Doc from org.eclipse.jgit.notes.NoteMerger.merge.

Merges the conflicting note changes.

base, ours and their are all notes on the same object.

Parameters
base:Note

version of the Note

ours:Note

version of the Note

theirs:Note

version of the Note

reader:ObjectReader

the object reader that must be used to read Git objects

inserter:ObjectInserter

the object inserter that must be used to insert Git objects

Returns:Note

the merge result

Annotations
@Override
Exceptions
IOException:
in case the reader or the inserter would throw an java.io.IOException the implementor will most likely want to propagate it as it can't do much to recover from it