diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2011-02-24 13:52:24 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2011-02-24 16:05:05 +0100 |
commit | e0a8398f1f167e4fceef7fa4ebbf413f16475e79 (patch) | |
tree | 8b519fa26da72f49e60668599c323417cee711ca | |
parent | 2902c7679bde83075370ff3c05e3dbbc6d637e42 (diff) | |
download | jgit-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.java | 3 |
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); |