jenkinsci/git-plugin — pull request #226 by mvrooyen (2014-04-20 14:59:33+00:00)
Title: Small fix to GitSCM.compareRemoteRevisionWithImpl(...)

String singleBranch not used when checking for head revision.
If the Git branch name is represented by an environment variable the *variable name* is passed to git.getHeadRev(...), instead of the expanded value in singleBranch.

This causes head to always be null, and the build is triggered continuously after polling, without any changes being present in the branch.