]> source.dussan.org Git - jgit.git/commitdiff
Make setCredentialsProvider more convenient to use 46/2346/1
authorMathias Kinzler <mathias.kinzler@sap.com>
Wed, 26 Jan 2011 17:03:22 +0000 (18:03 +0100)
committerMathias Kinzler <mathias.kinzler@sap.com>
Wed, 26 Jan 2011 17:03:22 +0000 (18:03 +0100)
Change-Id: I984836ea7d6a67fd2d1d05f270afa7c29f30971c
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java

index e75e20fee73f8b45fc63fb3354b75d67fa29cafd..f15509b4dc5932c103dc7381962be719a9ce4c04 100644 (file)
@@ -325,8 +325,12 @@ public class FetchCommand extends GitCommand<FetchResult> {
        /**
         * @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;
        }
 }
index 6981f77b18b2c812d4f39d9ed385c344c114aa69..3a35827b9a610da0fe1170a6adb3300f3b304709 100644 (file)
@@ -353,8 +353,12 @@ public class PushCommand extends GitCommand<Iterable<PushResult>> {
        /**
         * @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;
        }
 }