jenkinsci/branch-api-plugin — pull request #3 by mattmoor (2014-09-28 16:18:31+00:00)
Title: This change decouples branch/project name for MultiBranchProject items.

There were a number of places where the MultiBranchProject code assumed that branch and project name matched, which is problematic because branch names may include characters that are illegal in project names.

For example, I can create the branch "mattmoor/foo" whereas '/' is illegal in project names. Similarly, Util.rawEncode doesn't properly sanitize the name because '%' is an illegal character as well.

This code allows for ProjectFactory to return projects where the branch name doesn't match the project name, so that it can do things like sanitize the name.

NOTE: With this change, I was able to alter https://wiki.jenkins-ci.org/display/JENKINS/YAML+Project+Plugin to work properly with branches containing '/' characters.