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

[CIAPP-4278] Fix an issue with emojis in commit message breaking LocalGit tags provider #40

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

anmarchenko
Copy link
Member

What does this PR do?
Fixes an issue with emojis in git commit message.

Sometimes Ruby sets default external encoding to US_ASCII even thou LANG is "en_US.UTF-8". In these cases non-ASCII characters like emojis break LocalGit provider.

In order to mitigate that, I force UTF-8 encoding if external encoding is US-ASCII. It is safe to do as UTF-8 is backwards compatible with US-ASCII.

Motivation
Fixing bug report

How to test the change?
By running unit tests

@anmarchenko anmarchenko requested review from a team and juan-fernandez October 2, 2023 14:23
@anmarchenko anmarchenko merged commit f3be2c5 into main Oct 4, 2023
12 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/commit_emoji_issue_fix branch October 4, 2023 06:38
@github-actions github-actions bot added this to the 0.2.0 milestone Oct 4, 2023
@ivoanjo
Copy link
Member

ivoanjo commented Oct 4, 2023

Thanks for fixing this so I can litter commit messages with emoji again 🎉

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.

3 participants