aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Baumgart2011-02-02 07:13:28 (EST)
committerJens Baumgart2011-02-02 07:13:28 (EST)
commit29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42 (patch)
tree77a388ad33c75ae4aca10abe820c2dee33d30f07
parentb0245b548b9c9fe1801fb8af727b08a7c3cc9706 (diff)
downloadjgit-29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42.zip
jgit-29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42.tar.gz
jgit-29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42.tar.bz2
PushCommand: do not set a null credentials providerrefs/changes/00/2400/1
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>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
index 3a35827..e8175d0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
@@ -139,7 +139,8 @@ public class PushCommand extends GitCommand<Iterable<PushResult>> {
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);