git plugin doesn't support branch name contains slash ("/")

Details

Description

When a branch contains slash , if we try to specify such a branch in "Branch Name" field, it will not be able to fetch such branches. If we leave branch name as **, the job can fetch branch name containing slash without problem.

I am not a Java person, but this method looks suspicious in Branch.java, just trying to help debug

When encountering a single branch containing a '/', it is either a qualified branch or a branch containing a '/'
In the first case, the branch should start with the name of a declared remote
Otherwise, we fall back to unqualified behaviour, and we try to match the branch name as if it was */BRANCH

SCM/JIRA link daemon
added a comment - 2014-01-27 12:32 Code changed in jenkins
User: Vincent Latombe
Path:
src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java
http://jenkins-ci.org/commit/git-plugin/ea5cad7e2759d0c9f5ed723fe590f982b0bb818d
Log:
JENKINS-14026 DefaultBuildChooser should handle smartly branches with /
When encountering a single branch containing a '/', it is either a qualified branch or a branch containing a '/'
In the first case, the branch should start with the name of a declared remote
Otherwise, we fall back to unqualified behaviour, and we try to match the branch name as if it was */BRANCH

Branch names containing slashes and tag based checkout are both supported since git client plugin 1.10.0 through the commit submitted by Alexander Link. The online help for the "Branches to build" field has been updated to explain the extended syntax.

The extended syntax allows the plugin to continue supporting the old format branch specifiers and still allow specification of branch names with embedded slash characters (like develop/my-branch). The extended syntax also allows checkout of tags.

Mark Waite
added a comment - 2014-08-29 16:31 Branch names containing slashes and tag based checkout are both supported since git client plugin 1.10.0 through the commit submitted by Alexander Link. The online help for the "Branches to build" field has been updated to explain the extended syntax.
The extended syntax allows the plugin to continue supporting the old format branch specifiers and still allow specification of branch names with embedded slash characters (like develop/my-branch). The extended syntax also allows checkout of tags.