Skip to content

Patterns in .git/info/exclude aren't ignored #13474

@thetarnav

Description

@thetarnav

Changes to files in ignored by .git/info/exclude show up in the "Modified Files" section, in the sidebar.
Looke like .gitignore is getting used—changes in node_modules are not reported while in .gitignore.
But not .git/info/exclude.
Both of these files are excluding files from git and are respected by tools like ripgrep, so I think that opencode should do the same.

Image
cat .git/info/exclude
opencode.json
.grepai
.vscode/settings.json
.env

OpenCode version

1.1.65

Steps to reproduce

  1. echo "file_to_ignore" >> .git/info/exclude
  2. Modify that file
  3. Prompt opencode with something to trigger file change check

Operating System

Ubuntu 24.04.4 LTS

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions