Top Description Fields Constructors Methods
org.eclipse.jgit.merge

public Class SquashMessageFormatter

extends Object
Class Inheritance
Imports
java.util.List, org.eclipse.jgit.lib.PersonIdent, .Ref, org.eclipse.jgit.revwalk.RevCommit, org.eclipse.jgit.util.GitDateFormatter, .GitDateFormatter.Format

Formatter for constructing the commit message for a squashed commit.

The format should be the same as C Git does it, for compatibility.

Field Summary

Modifier and TypeField and Description
private GitDateFormatter

Constructor Summary

AccessConstructor and Description
public
SquashMessageFormatter()

Create a new squash message formatter.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

squashed commit message
format
(List<RevCommit>
the squashed commits
squashedCommits
,
Ref
the target branch
target
)

Construct the squashed commit message.

private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dateFormatterback to summary
private GitDateFormatter dateFormatter

Constructor Detail

SquashMessageFormatterback to summary
public SquashMessageFormatter()

Create a new squash message formatter.

Method Detail

formatback to summary
public String format(List<RevCommit> squashedCommits, Ref target)

Construct the squashed commit message.

Parameters
squashedCommits:List<RevCommit>

the squashed commits

target:Ref

the target branch

Returns:String

squashed commit message

toStringback to summary
private String toString(PersonIdent author)