Skip to content
Permalink
Browse files

Revert "[JENKINS-48061] Non GitSCMHeadMixin should be a branch"

This reverts commit 68a956f.
  • Loading branch information...
rsandell committed Mar 27, 2018
1 parent 0cc223c commit 1d3888812b647aa7a6ab256296551863760fdb61
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
@@ -384,12 +384,11 @@ public SCMRevision run(GitClient client, String remoteName) throws IOException,
// tag does not exist
return null;
}
} else if (head instanceof GitBranchSCMHead || !(head instanceof GitSCMHeadMixin)) {
GitBranchSCMHead branchHead = (head instanceof GitBranchSCMHead) ? (GitBranchSCMHead)head : new GitBranchSCMHead(head.getName());
} else if (head instanceof GitBranchSCMHead) {
for (Branch b : client.getRemoteBranches()) {
String branchName = StringUtils.removeStart(b.getName(), remoteName + "/");
if (branchName.equals(head.getName())) {
return new GitBranchSCMRevision(branchHead, b.getSHA1String());
return new GitBranchSCMRevision((GitBranchSCMHead)head, b.getSHA1String());
}
}
} else if (head instanceof GitRefSCMHead) {

0 comments on commit 1d38888

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