Skip to content
Permalink
Browse files

Merge pull request #65 from marc-guenther/jenkins-10880

[FIXED JENKINS-10880] check for existing lastBuild
  • Loading branch information
kohsuke committed Jun 26, 2012
2 parents b0cf7b7 + 91cc5c9 commit 0551fc3bf4b35b6afba71126f23ba0c01a9b3142
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/hudson/plugins/git/GitSCM.java
@@ -662,13 +662,14 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,

final BuildData buildData = fixNull(getBuildData(lastBuild, false));

if (buildData != null && buildData.lastBuild != null) {
if (buildData.lastBuild != null) {
listener.getLogger().println("[poll] Last Built Revision: " + buildData.lastBuild.revision);
}

final String singleBranch = getSingleBranch(lastBuild);

if (singleBranch != null && this.remotePoll) {
// fast remote polling needs a single branch and an existing last build
if (this.remotePoll && singleBranch != null && buildData.lastBuild != null && buildData.lastBuild.getRevision() != null) {
String gitExe = "";
GitTool[] installations = ((hudson.plugins.git.GitTool.DescriptorImpl)Hudson.getInstance().getDescriptorByType(GitTool.DescriptorImpl.class)).getInstallations();
for(GitTool i : installations) {

0 comments on commit 0551fc3

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