# Honor anchored patterns in \.git/info/exclude \(\#57779\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/315d474c2e2ab1a06ed3857a426d7069f7c31e34)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 315d474c2e2ab1a06ed3857a426d7069f7c31e34

Requested commit: 315d474c2e2ab1a06ed3857a426d7069f7c31e34

Commit: 315d474c2e2ab1a06ed3857a426d7069f7c31e34

Tree: 20a8c02041458713eb351f19d6e3af71310f17de

Author: Henrique Ferreiro

Committer: GitHub

## Message

```
Honor anchored patterns in .git/info/exclude (#57779)

Patterns in `.git/info/exclude` that contain a slash (e.g.
`.claude/worktrees`) are anchored: Git matches them relative to the
project root. Zed was instead matching them relative to the `.git/info/`
directory that the file lives in, so they matched nothing and had no
effect.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Support anchored patterns in .git/info/exclude

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
```

## Parents

- [dfda0732ad88e89900979c16660378d8651fc4a8](https://git.cafe/gitcafe/zed/commit/dfda0732ad88e89900979c16660378d8651fc4a8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/315d474c2e2ab1a06ed3857a426d7069f7c31e34?format=markdown)
