final String gitExe;
{
//If this project is tied onto a node, it's built always there. On other cases,
//polling is done on the node which did the last build.
//
Label label = project.getAssignedLabel();
if (label != null && label.isSelfLabel()) {
if (label.getNodes().iterator().next() != project.getLastBuiltOn()) {
listener.getLogger().println("Last build was not on tied node, forcing rebuild.");
return PollingResult.BUILD_NOW;
}
gitExe = getGitExe(label.getNodes().iterator().next(), listener);
} else {
gitExe = getGitExe(project.getLastBuiltOn(), listener);
}
}