Top Description Fields Methods
org.eclipse.jgit.api

public Interface CherryPickCommitMessageProvider

Imports
java.util.List, org.eclipse.jgit.revwalk.FooterLine, .RevCommit

The interface is used to construct a cherry-picked commit message based on the original commit
Since
6.9
See Also
ORIGINAL, ORIGINAL_WITH_REFERENCE

Field Summary

Modifier and TypeField and Description
public static final CherryPickCommitMessageProvider
ORIGINAL

This provider returns the original commit message

public static final CherryPickCommitMessageProvider
ORIGINAL_WITH_REFERENCE

This provider returns the original commit message with original commit hash in SHA-1 form.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

target cherry-picked commit message
getCherryPickedCommitMessage
(RevCommit
original cherry-picked commit
srcCommit
)

private static boolean

Field Detail

ORIGINALback to summary
public static final CherryPickCommitMessageProvider ORIGINAL

This provider returns the original commit message

ORIGINAL_WITH_REFERENCEback to summary
public static final CherryPickCommitMessageProvider ORIGINAL_WITH_REFERENCE

This provider returns the original commit message with original commit hash in SHA-1 form.
Example:

my original commit message

(cherry picked from commit 75355897dc28e9975afed028c1a6d8c6b97b2a3c)
This is similar to -x flag in git-scm (see https://git-scm.com/docs/git-cherry-pick#_options)

Method Detail

getCherryPickedCommitMessageback to summary
public String getCherryPickedCommitMessage(RevCommit srcCommit)
Parameters
srcCommit:RevCommit

original cherry-picked commit

Returns:String

target cherry-picked commit message

messageEndsWithFooterback to summary
private static boolean messageEndsWithFooter(RevCommit srcCommit)