I've two jobs: myproject and myproject-master
The first job is supposed to build all commits that land in master. It does its job admirably. The second job is supposed to build all other branches except master. For that purpose, I configured it as follows:
<scm class="hudson.plugins.git.GitSCM" plugin="email@example.com">
What happens when I push a branch "foo": myproject-branch builds it.
What happens when I push the master branch: myproject-branch wakes up, fetches upstream changes, then says this:
Seen 98 remote branches
No new revisions were found; the most-recently built branch will be built again.
and proceeds to build an unrelated branch.
What I expect: myproject-branch builds nothing.