Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-42234] Add the isMatch guard
  • Loading branch information
stephenc committed Feb 21, 2017
1 parent 81e9fe5 commit 4b08715
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/jenkins/branch/MultiBranchProject.java
Expand Up @@ -1319,11 +1319,13 @@ private int processHeadUpdate(SCMHeadEvent<?> event, TaskListener global, String
candidateNames.clear();
revisionMaps.clear();
for (SCMSource source : p.getSCMSources()) {
Map<SCMHead, SCMRevision> eventHeads = event.heads(source);
if (!eventHeads.isEmpty()) {
revisionMaps.put(source, eventHeads);
for (SCMHead h: eventHeads.keySet()) {
candidateNames.add(h.getName());
if (event.isMatch(source)) {
Map<SCMHead, SCMRevision> eventHeads = event.heads(source);
if (!eventHeads.isEmpty()) {
revisionMaps.put(source, eventHeads);
for (SCMHead h : eventHeads.keySet()) {
candidateNames.add(h.getName());
}
}
}
}
Expand Down

0 comments on commit 4b08715

Please sign in to comment.