Clean up ref name rules (#6437)

* Clean up ref name rules

Clean up checks on reference names to better conform to the guideline
here: https://git-scm.com/docs/git-check-ref-format

This fixes half of #6321

* Update branch create integration test

According to: https://git-scm.com/docs/git-check-ref-format

And: git check-ref-format "master/feature=test1"

This is a valid branch name and we should not be testing for it to fail.
This commit is contained in:
mrsdizzie 2019-03-26 15:59:48 -04:00 committed by Lauris BH
parent b4941f707b
commit d056bf300f
4 changed files with 132 additions and 4 deletions

View file

@ -58,7 +58,7 @@ func TestCreateBranch(t *testing.T) {
OldRefSubURL: "branch/master",
NewBranch: "feature=test1",
ExpectedStatus: http.StatusFound,
FlashMessage: i18n.Tr("en", "form.NewBranchName") + i18n.Tr("en", "form.git_ref_name_error"),
FlashMessage: i18n.Tr("en", "repo.branch.create_success", "feature=test1"),
},
{
OldRefSubURL: "branch/master",