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 chinese branch name download error #109

Closed
wants to merge 2 commits into from
Closed

Conversation

xdkhan
Copy link

@xdkhan xdkhan commented Mar 11, 2021

if use chinese branch name, download error.

eg.

pod 'Kingfisher', git:'https://github.com/xdkhan/Kingfisher.git', :branch=>'中文分支' 

then pod install, error:

[!] Failed to download 'Kingfisher': incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)

error reason

      def self.commit_from_ls_remote(output, branch_name)
        return nil if branch_name.nil?

        # output encoding type: ASCII-8BIT
        # branch_name encoding type: UTF-8

        match = %r{([a-z0-9]*)\trefs\/(heads|tags)\/#{Regexp.quote(branch_name)}}.match(output)
        match[1] unless match.nil?
      end

xdkhan added 2 commits March 11, 2021 17:22
…BIT string)

output encoding type: ASCII-8BIT, branch_name encoding type: UTF-8
@xdkhan xdkhan changed the title fix chinese branc name download error fix chinese branch name download error Mar 11, 2021
@xdkhan
Copy link
Author

xdkhan commented Mar 14, 2021

travis-ci is error.
截屏2021-03-14 下午9 57 34

@dnkoutso
Copy link
Contributor

@xdkhan can you please add a test and a changelog entry? Thanks!

@dnkoutso
Copy link
Contributor

dnkoutso commented Aug 3, 2021

superseded by #116

@dnkoutso dnkoutso closed this Aug 3, 2021
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.

2 participants