Package org.eclipse.jgit.api
Interface RebaseCommand.InteractiveHandler2
-
- All Superinterfaces:
RebaseCommand.InteractiveHandler
- Enclosing class:
- RebaseCommand
public static interface RebaseCommand.InteractiveHandler2 extends RebaseCommand.InteractiveHandler
ExtendsRebaseCommand.InteractiveHandler
with an enhanced callback for editing commit messages.- Since:
- 6.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RebaseCommand.InteractiveHandler2.ModifyResult
Describes 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.ModifyResult
editCommitMessage(String message, CommitConfig.CleanupMode mode, char commentChar)
Callback API for editing a commit message on REWORD or SQUASH.default String
modifyCommitMessage(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.ModifyResult
should haveCommitConfig.CleanupMode.VERBATIM
set 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-inmode
will be applied.- Parameters:
message
- existing commit messagemode
-CommitConfig.CleanupMode
currently setcommentChar
- comment character used- Returns:
- a
RebaseCommand.InteractiveHandler2.ModifyResult
-
modifyCommitMessage
default String modifyCommitMessage(String message)
Description copied from interface:RebaseCommand.InteractiveHandler
Used for editing commit message on REWORD or SQUASH.- Specified by:
modifyCommitMessage
in interfaceRebaseCommand.InteractiveHandler
- Parameters:
message
- existing commit message- Returns:
- new commit message
-
-