Merge pull request #6348 from lya001/fix-invalid-branch-name Fix creation of branches and tags with invalid names