Unfortunately, this does not seem to be fixed (for me, at least) in 2.0.1.
Steps to reproduce:
1. Create a new job. Use a git repo with multiple branches. Set the 'Branches to build > Branch specifier' to a specific branch, e.g. 'feature/my-feature'
2. Run a build
Result:
Notes:
- the clone works fine if I don't specify a branch
- even after a successful clone, if I edit the job config to specify a branch, it fails with the same error as above.
I don't know much about the internals of the Git plugin, but it looks like it's not doing a fetch, so it doesn't know what remote branches are available.
Seeing this as well. For a given pull request that has been updated a few times, the builds that succeeded triggered like this:
Nov 14, 2013 3:46:09 PM org.jenkinsci.plugins.ghprb.GhprbRepository createCommitStatus INFO: Setting status of (SHA) to PENDING with url null and message: Build triggered.
Those that failed:
Nov 14, 2013 4:11:09 PM org.jenkinsci.plugins.ghprb.GhprbRepository createCommitStatus INFO: Setting status of (SHA) to PENDING with url null and message: Merged build triggered.
So maybe the "Build" vs. "Merged build" determination is relevant.