Skip to content

Windows CLI and Desktop override core.autocrlf and core.symlinks, causing incorrect Git diffs #37846

Description

@PandaYuuHa

Description

On Windows, both the bundled CLI and Desktop clients invoke Git with:

-c core.autocrlf=false
-c core.symlinks=true

These command-scoped options override system, global, and repository-local Git configuration. This conflicts with common Git for Windows settings such as:

core.autocrlf=true
core.symlinks=false

As a result, OpenCode may report line-ending-only changes that do not appear when Git is invoked normally. It may also force symlink behavior that is unsupported or explicitly disabled on the user's system.

Plugins

No plugins

OpenCode version

1.18.3

Steps to reproduce

  1. Configure Git for CRLF working-tree files with symlinks disabled:

    git config --global core.autocrlf true
    git config --global core.symlinks false
  2. Clone or check out a repository using Git for Windows.

  3. Confirm that the repository is clean:

    git status
    git diff
  4. Open the repository in OpenCode CLI or Desktop.

  5. Trigger an internal Git operation, such as status inspection, diff generation, review, snapshot capture, or snapshot restore.

  6. Observe line-ending-only changes or other differences not reported by normal Git commands.

The behavior can be approximated with:

git -c core.autocrlf=false -c core.symlinks=true diff

Screenshot and/or share link

Image

Operating System

Windows 10

Terminal

Windows Terminal, Powershell 7

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

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