PushCommand: do not set a null credentials provider

PushCommand 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.

Bug: 336023
Change-Id: I7a7a9221afcfebe2e1595a5e59641e6c1ae4a207
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
This commit is contained in:
Jens Baumgart 2011-02-02 13:13:28 +01:00
parent b0245b548b
commit 29ed09a44f
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ public Iterable<PushResult> call() throws JGitInternalException,
if (receivePack != null)
transport.setOptionReceivePack(receivePack);
transport.setDryRun(dryRun);
transport.setCredentialsProvider(credentialsProvider);
if (credentialsProvider != null)
transport.setCredentialsProvider(credentialsProvider);
final Collection<RemoteRefUpdate> toPush = transport
.findRemoteRefUpdatesFor(refSpecs);