Skip to content

Conversation

@JASON-QWeb
Copy link

Summary

Fixes #7670
Same as #7408

This PR resolves on Web: when containing non-ASCII filenames, Path is error, so filenames and git diff will display uncorrect and cause SyntaxError.

Problem

  • For non-ASCII filenames (CN/KOR/JP) , Git emits quoted paths, so the filenames in session diffs don’t match the ones in snapshot diffs.
  • shell interpretation can interfere with git show when paths contain Unicode characters, resulting in empty before/after content when get summary diff.

Changes

  • use Bun.spawn to get git show, so it can avoid Bun shell interpretation error
  • add decodeGitQuotepath to handle non-ASCII filenames (CN/KOR/JP)

Solution

Make non-ASCII filenames (CN/KOR/JP) path can be decode correctly like other filenames on Web.

Verification

Make changes to three file: test.py , 测试.py and 시험.py

Before:

  • Filename is wrong and click will cause error
Before1 Before2

After:
After

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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.

OpenCode Desktop bug

1 participant