Skip to content

Commit

Permalink
[JENKINS-48061] Resolve other ref before tag name
Browse files Browse the repository at this point in the history
So we don't have to check timestamps on the tag
  • Loading branch information
rsandell committed May 4, 2018
1 parent 6ffc571 commit 191cf55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand All @@ -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);
Expand Down

0 comments on commit 191cf55

Please sign in to comment.