aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2011-02-24 13:52:24 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2011-02-24 16:05:05 +0100
commite0a8398f1f167e4fceef7fa4ebbf413f16475e79 (patch)
tree8b519fa26da72f49e60668599c323417cee711ca
parent2902c7679bde83075370ff3c05e3dbbc6d637e42 (diff)
downloadjgit-e0a8398f1f167e4fceef7fa4ebbf413f16475e79.tar.gz
jgit-e0a8398f1f167e4fceef7fa4ebbf413f16475e79.zip
FetchCommand: do not set a null credentials provider
FetchCommand now does not set a null credentials provider on Transport because in this case the default provider is replaced with null and the default mechanism for providing credentials is not working. Change-Id: I44096aa856f031545df39d4b09af198caa2c21f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java3
1 files changed, 2 insertions, 1 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 28c2d15ff6..9594dfebe7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
@@ -128,7 +128,8 @@ public class FetchCommand extends GitCommand<FetchResult> {
if (tagOption != null)
transport.setTagOpt(tagOption);
transport.setFetchThin(thin);
- transport.setCredentialsProvider(credentialsProvider);
+ if (credentialsProvider != null)
+ transport.setCredentialsProvider(credentialsProvider);
try {
FetchResult result = transport.fetch(monitor, refSpecs);