Skip to content
Permalink
Browse files

[JENKINS-48061] Motivate withoutRefspec

  • Loading branch information...
rsandell committed Mar 27, 2018
1 parent 1340f86 commit cb2e753cd81be123af628c7f502681ef6b2a9a34
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
@@ -371,6 +371,8 @@ protected SCMRevision retrieve(@NonNull final SCMHead head, @NonNull final TaskL
return telescope.getRevision(remote, credentials, head);
}
if (head instanceof GitSCMHeadMixin) {
//Since it is a specific SCMHead we are after, that we know the refspec of
//we can save a bit of time and bandwidth by just fetching that refspec
context = context.withoutRefSpecs().withRefSpec(((GitSCMHeadMixin) head).getRef());
}
return doRetrieve(new Retriever<SCMRevision>() {

0 comments on commit cb2e753

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