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>
6b95ac3d33Matei Oprea committed on 9/18/2026, 10:24:51 AM· committed by GitHubparent94c997e