Skip to content

Undo/revert fails for files with non-ASCII filenames on Windows #10210

@yimingll

Description

@yimingll

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

  1. Create a project with a file named with non-ASCII characters (e.g., 公共函数.cpp)
  2. Make changes to the file using opencode
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions