Status: Closed (View Workflow)
Debian Squeeze on x86_64
If a branch to build is specified like REPONAME/BRANCHNAME then the git plugin will look for branches named REPONAME/REPONAME/BRANCHNAME.
Worse still, if the git repository has multiple repositories configured, it will then search for OTHERREPO/REPONAME/REPONAME/BRANCHNAME.
I believe this is the same cause as https://issues.jenkins-ci.org/browse/JENKINS-14394
I believe the problem code to be https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java#L73, the block after 'if (!singleBranch.contains("/"))' should be inside it, since that is for unqialified branches.
I worked around this issue by changing the refspecs to include an extra component in the branch, so origin/master becomes origin/UGLYHACK/master with '+refs/heads/*:refs/remotes/origin/UGLYHACK/*', so the branch specification becomes origin/*/master.
- is related to
JENKINS-14026 git plugin doesn't support branch name contains slash ("/")
JENKINS-14394 1.1.21: Couldn't find any revision to build
Code changed in jenkins
User: Nicolas De Loof
[FIXED JENKINS-14480] handle fully qualified branch names
backward compatible way
Any news on when 1.1.22 will be released? I see it's already in the changelog on the wiki, but hasn't been released yet.
Are you just looking for testers to make sure the update fixes the bug?
This happened to me also. I was just investigating why a job that usually runs fine has started failing after the git plugin upgrade to 1.1.21. The job was configured to build "origin/master". Jenkins system log shows it running git command like this:
Reconfiguring the job to build branch "master" fixed it. However, it would be nice if the existing behavior could be kept. At work I have hundreds of jobs configured with "origin/master" and it wouldn't be nice to have to change them all.