{{ message }}
Repository navigation
Force commit messages output to UTF-8 - #331087
Merged
Dmitriy Vasyura (dmitrivMS) merged 13 commits intoSep 8, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 13 commits into
Dmitriy Vasyura (dmitrivMS) merged 13 commits into
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves handling of non-UTF-8 commit message encodings by forcing Git log output to UTF-8 and adds a smoke test to validate that behavior.
Changes:
- Added a smoke test that commits an EUC-JP encoded message and asserts it’s read back as UTF-8.
- Updated Git process spawning to apply
i18n.logOutputEncoding=UTF-8via-cfor spawned Git commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| extensions/git/src/test/smoke.test.ts | Adds coverage for reading non-UTF-8 commit messages via repository log. |
| extensions/git/src/git.ts | Forces Git log output encoding to UTF-8 by injecting -c i18n.logOutputEncoding=UTF-8. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
yutotnh (@yutotnh) Could you please address Copilot's comments? |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Author
Dmitriy Vasyura (dmitrivMS)
requested changes
Aug 21, 2026
…`-c` directly instead.
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 23, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 6, 2026 06:02
Dmitriy Vasyura (dmitrivMS)
merged commit Sep 8, 2026
4127665
into
microsoft:main
29 of 30 checks passed
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 27, 2026
* Force commit messages output to UTF-8 * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Capture i18n.commitEncoding before tests and restore it afterward * Restrict UTF-8 log output to commit message display commands * Remove the `forceUtf8LogOutputEncoding` option and change it to pass `-c` directly instead. * Set i18n.logOutputEncoding and restore it afterward * Cover blame2 and other internal methods in the i18n.logOutputEncoding test --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com> (cherry picked from commit 4127665)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #331086
Summary
I modified the code to enforce the
i18n.logOutputEncoding=UTF-8setting when calling Git.Test
The test I added checks whether commit messages written in an encoding other than UTF-8 (EUC-JP) are retrieved as UTF-8.
Without my fix, they would be retrieved as EUC-JP, causing the test to fail.
Image
Additional Information
Even after applying this setting, my local test results showed that the execution time remained unchanged.
I conducted the following experiment in the vscode repository.
If no settings are specified
If a setting is specified