Skip to content

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

Closed

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

Activity

  1. github-actions commented on Jan 23, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. added a commit that references this issue on Jan 23, 2026
    8d4ccf4
  3. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions