-
Bug
-
Resolution: Fixed
-
Major
-
None
Given a build which has an scm trigger, fast remote polling and a branch which is specified via build parameter, then the git-plugin polling will continue to trigger builds even no changes have been made.
When debugging with both git url and branch as build parameters, it appears the url is able to be resolved correctly, but the branch is not. This appears to affect polling only as the correct branch is able to be built without an scm trigger.
Debugging has shown the problem in and about in compareRemoteRevisionWithImpl(..) in GitSCM:
Here singleBranch is able to resolve the branch as a build parameter (in the getSingleBranch(..)), but head always will resolve to null as the branch name is given as a parameter which obviously won't exist in the remote git repo.
It looks like the branch name for head just needs to be filtered in the same ways getSingleBranch(..) does to accept build parameters.