From: Mathias Kinzler Date: Wed, 26 Jan 2011 17:03:22 +0000 (+0100) Subject: Make setCredentialsProvider more convenient to use X-Git-Tag: v0.11.1~50^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F2346%2F1;p=jgit.git Make setCredentialsProvider more convenient to use Change-Id: I984836ea7d6a67fd2d1d05f270afa7c29f30971c Signed-off-by: Mathias Kinzler --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java index e75e20fee7..f15509b4dc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java @@ -325,8 +325,12 @@ public class FetchCommand extends GitCommand { /** * @param credentialsProvider * the {@link CredentialsProvider} to use + * @return {@code this} */ - public void setCredentialsProvider(CredentialsProvider credentialsProvider) { + public FetchCommand setCredentialsProvider( + CredentialsProvider credentialsProvider) { + checkCallable(); this.credentialsProvider = credentialsProvider; + return this; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java index 6981f77b18..3a35827b9a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java @@ -353,8 +353,12 @@ public class PushCommand extends GitCommand> { /** * @param credentialsProvider * the {@link CredentialsProvider} to use + * @return {@code this} */ - public void setCredentialsProvider(CredentialsProvider credentialsProvider) { + public PushCommand setCredentialsProvider( + CredentialsProvider credentialsProvider) { + checkCallable(); this.credentialsProvider = credentialsProvider; + return this; } }