Package org.eclipse.jgit.merge
Class MergeMessageFormatter
- java.lang.Object
-
- org.eclipse.jgit.merge.MergeMessageFormatter
-
public class MergeMessageFormatter extends java.lang.Object
Formatter for constructing the commit message for a merge commit.The format should be the same as C Git does it, for compatibility.
-
-
Constructor Summary
Constructors Constructor Description MergeMessageFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(java.util.List<Ref> refsToMerge, Ref target)
Construct the merge commit message.java.lang.String
formatWithConflicts(java.lang.String message, java.util.List<java.lang.String> conflictingPaths)
Add section with conflicting paths to merge message.
-
-
-
Method Detail
-
format
public java.lang.String format(java.util.List<Ref> refsToMerge, Ref target)
Construct the merge commit message.- Parameters:
refsToMerge
- the refs which will be mergedtarget
- the branch ref which will be merged into- Returns:
- merge commit message
-
formatWithConflicts
public java.lang.String formatWithConflicts(java.lang.String message, java.util.List<java.lang.String> conflictingPaths)
Add section with conflicting paths to merge message.- Parameters:
message
- the original merge messageconflictingPaths
- the paths with conflicts- Returns:
- merge message with conflicting paths added
-
-