Skip to content
Permalink
Browse files

[JENKINS-48061] Resolve other ref before tag name

So we don't have to check timestamps on the tag
  • Loading branch information...
rsandell committed May 4, 2018
1 parent 6ffc571 commit 191cf5562d801a0d8749c847451595271872b6a8
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
@@ -911,6 +911,9 @@ protected SCMRevision retrieve(@NonNull final String revision, @NonNull final Ta
return new GitRefSCMRevision(new GitRefSCMHead(shortHashMatch, shortNameMatches.iterator().next()), shortHashMatch);
}
}
if (candidateOtherRef != null) {
return candidateOtherRef;
}
if (tagName != null) {
listener.getLogger().println(
"Resolving tag commit... (remote references may be a lightweight tag or an annotated tag)");
@@ -934,9 +937,6 @@ public SCMRevision run(GitClient client, String remoteName) throws IOException,
context,
listener, false);
}
if (candidateOtherRef != null) {
return candidateOtherRef;
}
// Pokémon!... Got to catch them all
listener.getLogger().printf("Could not find %s in remote references. "
+ "Pulling heads to local for deep search...%n", revision);

0 comments on commit 191cf55

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