-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Escape special characters in ref name for update ref #2454
Escape special characters in ref name for update ref #2454
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov Report
@@ Coverage Diff @@
## master #2454 +/- ##
=======================================
Coverage 98.03% 98.03%
=======================================
Files 122 122
Lines 10689 10689
=======================================
Hits 10479 10479
Misses 144 144
Partials 66 66
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @shravan1k !
Please add a unit test that demonstrates this change in functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whups - checked the wrong box.
Thank you, @shravan1k !
Please add a unit test that demonstrates this change in functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful, @shravan1k ! Thank you!
LGTM.
Awaiting second LGTM from any other contributor to this repo before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thank you, @marcelosousa ! |
Closes #2453
Most of the functions that deal with refs make sure to escape the special characters within the ref's name. The
UpdateRef
function doesn't seem to call the function that does this substitution of special characters with their encodings. This PR solves this problem and should now successfully patch remote refs if theGetRef
function says the corresponding ref exists.