Package org.eclipse.jgit.api
Interface RebaseCommand.InteractiveHandler2
- All Superinterfaces:
RebaseCommand.InteractiveHandler
- Enclosing class:
- RebaseCommand
Extends
RebaseCommand.InteractiveHandler with an enhanced callback for editing
commit messages.- Since:
- 6.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDescribes the result of editing a commit message: the new message, and how it should be cleaned. -
Method Summary
Modifier and TypeMethodDescriptioneditCommitMessage(String message, CommitConfig.CleanupMode mode, char commentChar) Callback API for editing a commit message on REWORD or SQUASH.default StringmodifyCommitMessage(String message) Used for editing commit message on REWORD or SQUASH.Methods inherited from interface org.eclipse.jgit.api.RebaseCommand.InteractiveHandler
prepareSteps
-
Method Details
-
editCommitMessage
@NonNull RebaseCommand.InteractiveHandler2.ModifyResult editCommitMessage(@NonNull String message, @NonNull CommitConfig.CleanupMode mode, char commentChar) Callback API for editing a commit message on REWORD or SQUASH.The callback gets the comment character currently set, and the clean-up mode. It can use this information when presenting the message to the user, and it also has the possibility to clean the message itself (in which case the returned
RebaseCommand.InteractiveHandler2.ModifyResultshould haveCommitConfig.CleanupMode.VERBATIMset lest JGit cleans the message again). It can also override the initial clean-up mode by returning clean-up mode other thanCommitConfig.CleanupMode.DEFAULT. If it does returnDEFAULT, the passed-inmodewill be applied.- Parameters:
message- existing commit messagemode-CommitConfig.CleanupModecurrently setcommentChar- comment character used- Returns:
- a
RebaseCommand.InteractiveHandler2.ModifyResult
-
modifyCommitMessage
Description copied from interface:RebaseCommand.InteractiveHandlerUsed for editing commit message on REWORD or SQUASH.- Specified by:
modifyCommitMessagein interfaceRebaseCommand.InteractiveHandler- Parameters:
message- existing commit message- Returns:
- new commit message
-