Description
On Windows, the /undo command fails to revert files with non-ASCII characters in their filenames (e.g., Chinese, Japanese, Korean).
Steps to Reproduce
- Create a project with a file named with non-ASCII characters (e.g.,
公共函数.cpp)
- Make changes to the file using opencode
- Run
/undo
Expected Behavior
The file should be reverted to its previous state.
Actual Behavior
- Files with ASCII names are reverted correctly
- Files with non-ASCII names are NOT reverted (fail silently)
Root Cause
Bun's dollar template literal on Windows incorrectly handles variable interpolation, causing git commands to fail for non-ASCII paths.
Environment
- OS: Windows 11
- opencode version: 1.1.34
Workaround
Set global git config:
git config --global core.quotepath false
Related
Description
On Windows, the
/undocommand fails to revert files with non-ASCII characters in their filenames (e.g., Chinese, Japanese, Korean).Steps to Reproduce
公共函数.cpp)/undoExpected Behavior
The file should be reverted to its previous state.
Actual Behavior
Root Cause
Bun's dollar template literal on Windows incorrectly handles variable interpolation, causing git commands to fail for non-ASCII paths.
Environment
Workaround
Set global git config:
git config --global core.quotepath falseRelated