Package org.eclipse.jgit.api
Interface RebaseCommand.InteractiveHandler2
-
- All Superinterfaces:
RebaseCommand.InteractiveHandler
- Enclosing class:
- RebaseCommand
public static interface RebaseCommand.InteractiveHandler2 extends RebaseCommand.InteractiveHandler
ExtendsRebaseCommand.InteractiveHandlerwith an enhanced callback for editing commit messages.- Since:
- 6.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceRebaseCommand.InteractiveHandler2.ModifyResultDescribes the result of editing a commit message: the new message, and how it should be cleaned.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RebaseCommand.InteractiveHandler2.ModifyResulteditCommitMessage(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 Detail
-
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
default String modifyCommitMessage(String message)
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
-
-