Skip to content
Permalink
Browse files

Revert "Can poll without workspace"

This reverts commit ccd4efa.
  • Loading branch information...
ndeloof committed Jun 26, 2015
1 parent 8d3b633 commit 54d0c5f4cae24e7c78cda24fac912ff1a13a67c5
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/hudson/plugins/git/GitSCM.java
@@ -518,7 +518,7 @@ private boolean requiresWorkspaceForPolling(EnvVars environment) {
for (GitSCMExtension ext : getExtensions()) {
if (ext.requiresWorkspaceForPolling()) return true;
}
return false;
return getSingleBranch(environment) == null;
}

@Override
@@ -566,6 +566,8 @@ private PollingResult compareRemoteRevisionWithImpl(Job<?, ?> project, Launcher

final EnvVars pollEnv = project instanceof AbstractProject ? GitUtils.getPollEnvironment((AbstractProject) project, workspace, launcher, listener, false) : lastBuild.getEnvironment(listener);

final String singleBranch = getSingleBranch(pollEnv);

if (!requiresWorkspaceForPolling(pollEnv)) {

final EnvVars environment = project instanceof AbstractProject ? GitUtils.getPollEnvironment((AbstractProject) project, workspace, launcher, listener, false) : new EnvVars();
@@ -655,7 +657,6 @@ private PollingResult compareRemoteRevisionWithImpl(Job<?, ?> project, Launcher

listener.getLogger().println("Polling for changes in");

final String singleBranch = getSingleBranch(pollEnv);
Collection<Revision> candidates = getBuildChooser().getCandidateRevisions(
true, singleBranch, git, listener, buildData, new BuildChooserContextImpl(project, null, environment));

0 comments on commit 54d0c5f

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