Skip to content
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

fix(resolution): Handle git urls that have a hash in the branch name. #5960

Closed
wants to merge 3 commits into from

Conversation

rally25rs
Copy link
Contributor

Summary

Previously yarn was using a string split('#') to separate the URL from the branch name. If a branch
also had a hash in it, then the rest of the split chunks were ignored, meaning only the chunk before
the first '#' was used as the branch name. This change handles those URLs correctly, preserving the
'#'s in URL hashes.

fixes #5954

Test plan

Added __tests__/utils/version.js

Previously yarn was using a string split('#') to separate the URL from the branch name. If a branch
also had a hash in it, then the rest of the split chunks were ignored, meaning only the chunk before
the first '#' was used as the branch name. This change handles those URLs correctly, preserving the
'#'s in URL hashes.

yarnpkg#5954
@buildsize
Copy link

buildsize bot commented Jun 9, 2018

File name Previous Size New Size Change
yarn-[version].noarch.rpm 925.41 KB 917.31 KB -8.09 KB (1%)
yarn-[version].js 4 MB 3.97 MB -31.13 KB (1%)
yarn-legacy-[version].js 4.16 MB 4.13 MB -31.21 KB (1%)
yarn-v[version].tar.gz 930.79 KB 922.4 KB -8.39 KB (1%)
yarn_[version]all.deb 685.15 KB 681.22 KB -3.93 KB (1%)

@arcanis
Copy link
Member

arcanis commented Jun 11, 2018

We had this PR (#4881) that was also fixing this - my main concern was the possible ambiguity. What do you think? I'm not hell-bent on this, if you think it's for the best feel free to merge it.

@rally25rs
Copy link
Contributor Author

Closing this in favor of the existing #4881

@rally25rs rally25rs closed this Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to install a branch with a # in the name with git+ssh
2 participants