]> source.dussan.org Git - jgit.git/commitdiff
FetchCommand: do not set a null credentials provider 86/2586/2
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 24 Feb 2011 12:52:24 +0000 (13:52 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 24 Feb 2011 15:05:05 +0000 (16:05 +0100)
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>
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

index 28c2d15ff63932a3ab944585220e6250409a252d..9594dfebe7def7be192f220f7f6dede2001b5d70 100644 (file)
@@ -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);