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

escapes branch names in push_to_git_remote action #13444

Merged
merged 5 commits into from
Sep 28, 2018

Conversation

RishabhTayal
Copy link
Contributor

fixes #13389 by escaping branch name

Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows doesn't know ' as an escaping thing.

@janpio
Copy link
Member

janpio commented Sep 26, 2018

Fails on Windows:

C:\Projects\Fastlane\win-fastlane (janpio-release-1.0.0(1) -> origin)
λ git push origin 'janpio-release-1.0.0(1)':'janpio-release-1.0.0(2)'
error: src refspec 'janpio-release-1.0.0(1)' does not match any.
error: failed to push some refs to 'https://github.com/fastlane/fastlane'

Works on Windows:

C:\Projects\Fastlane\win-fastlane (janpio-release-1.0.0(1) -> origin)
λ git push origin "janpio-release-1.0.0(1)":"janpio-release-1.0.0(2)"
Username for 'https://github.com': ...

You should probably just use .shellescape on the string.

@RishabhTayal
Copy link
Contributor Author

RishabhTayal commented Sep 26, 2018

like this: "#{local_branch.shellescape}:#{remote_branch.shellescape}"?

@janpio
Copy link
Member

janpio commented Sep 26, 2018

Yep, that should work.

@RishabhTayal
Copy link
Contributor Author

@janpio Done. Ready for review now.

@janpio janpio merged commit 0990386 into fastlane:master Sep 28, 2018
@fastlane-bot
Copy link

Hey @RishabhTayal 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.106.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

push_to_git_remote doesn't escape branch names
4 participants