Package com.google.gerrit.server.git
Interface ChangeMessageModifier
-
public interface ChangeMessageModifier
Allows to modify the commit message for new commits generated by Rebase Always submit strategy.Invoked by Gerrit when all information about new commit is already known such as parent(s), tree hash, etc, but commit's message can still be modified.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
onSubmit(String newCommitMessage, org.eclipse.jgit.revwalk.RevCommit original, org.eclipse.jgit.revwalk.RevCommit mergeTip, Branch.NameKey destination)
Implementation must return non-Null commit message.
-
-
-
Method Detail
-
onSubmit
String onSubmit(String newCommitMessage, org.eclipse.jgit.revwalk.RevCommit original, org.eclipse.jgit.revwalk.RevCommit mergeTip, Branch.NameKey destination)
Implementation must return non-Null commit message.mergeTip and original commit are guaranteed to have their body parsed, meaning that their commit messages and footers can be accessed.
- Parameters:
newCommitMessage
- the new commit message that was result of eitherMergeUtil.createDetailedCommitMessage(org.eclipse.jgit.revwalk.RevCommit, com.google.gerrit.server.notedb.ChangeNotes, com.google.gerrit.reviewdb.client.PatchSet.Id)
called before- other extensions or plugins implementing the same point and called before.
original
- the commit of the change being submitted. Note that its commit message may be different than newCommitMessage argument.mergeTip
- the current HEAD of the destination branch, which will be a parent of a new commit being generateddestination
- the branch onto which the change is being submitted- Returns:
- a new not null commit message.
-
-