public class MergeMessageFormatter
extends java.lang.Object
The format should be the same as C Git does it, for compatibility.
Constructor and Description |
---|
MergeMessageFormatter() |
Modifier and Type | Method and Description |
---|---|
private static void |
addConflictsMessage(java.util.List<java.lang.String> conflictingPaths,
java.lang.StringBuilder sb) |
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.
|
private static java.lang.String |
joinNames(java.util.List<java.lang.String> names,
java.lang.String singular,
java.lang.String plural) |
public java.lang.String format(java.util.List<Ref> refsToMerge, Ref target)
refsToMerge
- the refs which will be mergedtarget
- the branch ref which will be merged intopublic java.lang.String formatWithConflicts(java.lang.String message, java.util.List<java.lang.String> conflictingPaths)
message
- the original merge messageconflictingPaths
- the paths with conflictsprivate static void addConflictsMessage(java.util.List<java.lang.String> conflictingPaths, java.lang.StringBuilder sb)
private static java.lang.String joinNames(java.util.List<java.lang.String> names, java.lang.String singular, java.lang.String plural)