summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathias Kinzler2011-01-26 12:03:22 (EST)
committer Mathias Kinzler2011-01-26 12:03:22 (EST)
commit414e0cd329a4ade6b98c7df9d832ab272090325a (patch)
tree8f821d546e8255db14f2bf82bea8899dee395c19
parent36e396f8b997d83480a392cc102d9dda38e24019 (diff)
downloadjgit-414e0cd329a4ade6b98c7df9d832ab272090325a.zip
jgit-414e0cd329a4ade6b98c7df9d832ab272090325a.tar.gz
jgit-414e0cd329a4ade6b98c7df9d832ab272090325a.tar.bz2
Make setCredentialsProvider more convenient to userefs/changes/46/2346/1
Change-Id: I984836ea7d6a67fd2d1d05f270afa7c29f30971c Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java6
2 files changed, 10 insertions, 2 deletions
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 e75e20f..f15509b 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<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;
}
}
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 6981f77..3a35827 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<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;
}
}