-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up ref name rules #6437
Clean up ref name rules #6437
Conversation
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 go-gitea#6321
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.
Codecov Report
@@ Coverage Diff @@
## master #6437 +/- ##
==========================================
- Coverage 38.85% 38.85% -0.01%
==========================================
Files 365 365
Lines 51413 51414 +1
==========================================
- Hits 19978 19977 -1
- Misses 28566 28568 +2
Partials 2869 2869
Continue to review full report at Codecov.
|
Please send backport to release v1.7 and v1.8 branches |
* 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 go-gitea#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.
* 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 go-gitea#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.
|
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
To see example of current problem, just try and create a branch or tag with a valid name containing allowed special characters like
test+me
. It will incorrectly sayTagName must be a well-formed Git reference name
I've tried to add several extra tests as well since if a bad name gets by this check it can later through a less friendly 500 error if we try to create a branch with a bad name