Skip to content

process_full_diff: Don't reencode diffs which are already UTF-8 #369

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

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

tbrand
Copy link
Contributor

@tbrand tbrand commented Jun 11, 2018

Abstract

I'm heavy user of https://github.com/danger/danger and it internally uses this gem.
Danger frequently refers the git diff.

I noticed when git diff contains multi bytes text, the full_diff_utf8_encoded includes invalid chars like below.

2018-06-11 17 37 36

I saw #276 and I could understand the background of the code.
The command_lines method had been fixed for it (fe680f8) but the process_full_diff had not.

Changes

Do not force to encode diff patch when the encoding type of it is UTF-8.

@tbrand
Copy link
Contributor Author

tbrand commented Jun 17, 2018

ping

@perlun perlun changed the title Do not force to encode diff patch process_full_diff: Don't reencode diffs which are already UTF-8 Jun 25, 2018
Copy link
Contributor

@perlun perlun left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@perlun perlun merged commit d5b0ec0 into ruby-git:master Jun 25, 2018
@tbrand tbrand deleted the fix-process_full_diff branch July 30, 2018 01:40
@tbrand
Copy link
Contributor Author

tbrand commented Jul 30, 2018

Thanks for merging this. When the patch will be released?

@perlun
Copy link
Contributor

perlun commented Aug 10, 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.

2 participants