# git: Fix git info exclude action for worktrees \(\#63967\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6b95ac3d33ea38b3f4cbfccc83e83233cc132a05

Requested commit: 6b95ac3d33ea38b3f4cbfccc83e83233cc132a05

Commit: 6b95ac3d33ea38b3f4cbfccc83e83233cc132a05

Tree: 6a8d78de5278a31bb7fa265ed15c9f7bb9e3b325

Author: Matei Oprea

Committer: GitHub

## Message

```
git: Fix git info exclude action for worktrees (#63967)

# Objective

- This PR fixes #63760. According to git docs "Patterns read from
$GIT_DIR/info/exclude".

## Solution

- We were reading the directory's absolute path instead of reading the
absolute path to the repository's common .git directory.


## Self-Review Checklist:

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

---

Release Notes:

- Fixed "Add to .git/info/exclude" not working when used from a
secondary git worktree

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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