Browse Source

FetchCommand: pass on CredentialsProvider to submodule fetches

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>
stable-4.9
Thomas Wolf 7 years ago committed by Matthias Sohn
parent
commit
1637c44048
  1. 1
      org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

1
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

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

Loading…
Cancel
Save