diff options
author | Alex Blewitt <alex.blewitt@gmail.com> | 2021-03-19 11:23:29 +0000 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-03-19 14:55:56 +0100 |
commit | b6d4844b5d60f63a46f2b8b42189f70de653b385 (patch) | |
tree | f55d1ad31cbab0b9aefcf5b0296e02dcce82e61b | |
parent | d081ff78f7bbdffea3334aaea207125adeb6819b (diff) | |
download | jgit-b6d4844b5d60f63a46f2b8b42189f70de653b385.tar.gz jgit-b6d4844b5d60f63a46f2b8b42189f70de653b385.zip |
Enable CommitCommand to use a fluent style
By returning `this` at the end of the `setCredentialsProvider()` the API
can be used as a fluent style.
This change is source compatible but not binary compatible with existing
clients, and so adding this will require a major version change.
Bug: 553116
Change-Id: I72eaefee72825fa2246319a94a0df3c0cb7061fc
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java index 31f6a31c75..041276c0f8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java @@ -1019,10 +1019,12 @@ public class CommitCommand extends GitCommand<RevCommit> { * @param credentialsProvider * the provider to use when querying for credentials (eg., during * signing) - * @since 5.3 + * @return {@code this} + * @since 6.0 */ - public void setCredentialsProvider( + public CommitCommand setCredentialsProvider( CredentialsProvider credentialsProvider) { this.credentialsProvider = credentialsProvider; + return this; } } |