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>
This commit is contained in:
Matthias Sohn 2011-02-24 13:52:24 +01:00
parent 2902c7679b
commit e0a8398f1f
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ public FetchResult call() throws JGitInternalException,
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);