]> source.dussan.org Git - jgit.git/commitdiff
FetchCommand: pass on CredentialsProvider to submodule fetches 37/103737/2
authorThomas Wolf <thomas.wolf@paranor.ch>
Sun, 27 Aug 2017 13:35:35 +0000 (15:35 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 27 Aug 2017 14:37:43 +0000 (16:37 +0200)
When a JGit API command is implemented in terms of other API
commands, the child command must "inherit" all relevant settings.
Calling configure() ensures that the CredentialsProvider and the
connection timeout are propagated correctly.

Bug: 515325
Change-Id: I948e306693a9edb7b199a735877413b6eddcfba4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

index 485315968aa7ffcd1906ad12b4dcdf0f43df69f3..8f83de79ac500aa7a2b9230f4862c9da5364efd9 100644 (file)
@@ -192,6 +192,7 @@ public class FetchCommand extends TransportCommand<FetchCommand, FetchResult> {
                                                        .setThin(thin).setRefSpecs(refSpecs)
                                                        .setDryRun(dryRun)
                                                        .setRecurseSubmodules(recurseMode);
+                                       configure(f);
                                        if (callback != null) {
                                                callback.fetchingSubmodule(walk.getPath());
                                        }