Skip to content
Permalink
Browse files

[JENKINS-43507] Documenting GitSCMBuilder

  • Loading branch information...
stephenc committed May 2, 2017
1 parent 3c3336e commit 7c2ba1bc4f91a89e97d8ef5916c56fbcb7992d3d
@@ -617,15 +617,13 @@ protected StandardUsernameCredentials getCredentials() {
}

protected GitSCMBuilder newBuilder(@NonNull SCMHead head, @CheckForNull SCMRevision revision) {
return new GitSCMBuilder(head, revision);
return new GitSCMBuilder(head, revision, getRemote(), getCredentialsId());
}

@NonNull
@Override
public SCM build(@NonNull SCMHead head, @CheckForNull SCMRevision revision) {
GitSCMBuilder builder = newBuilder(head, revision)
.withRemote(getRemote())
.withCredentials(getCredentialsId());
GitSCMBuilder builder = newBuilder(head, revision);
if (Util.isOverridden(AbstractGitSCMSource.class, getClass(), "getExtensions")) {
builder.withExtensions(getExtensions());
}
@@ -640,7 +638,7 @@ public SCM build(@NonNull SCMHead head, @CheckForNull SCMRevision revision) {
for (RefSpec spec: getRefSpecs()) {
specs.add(spec.toString());
}
builder.withRefSpecs(specs);
builder.withoutRefSpecs().withRefSpecs(specs);
}
return builder.withTraits(getTraits()).build();
}

0 comments on commit 7c2ba1b

Please sign in to comment.
You can’t perform that action at this time.