# Fix handling of git repositories with an external git directory \(\#55402\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 42f94204373f1ec53b179bdfdeff156b4162485b

Requested commit: 42f94204373f1ec53b179bdfdeff156b4162485b

Commit: 42f94204373f1ec53b179bdfdeff156b4162485b

Tree: d70d90530f013b774cbd9b014aeef8d0f8d052a6

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Fix handling of git repositories with an external git directory (#55402)

Closes https://github.com/zed-industries/zed/issues/54824

Previously, we always assumed that `gitdir` was an absolute path. Also,
we did not correctly handle custom gitignore files that were configured
via separate git directories.

Release Notes:

- Fixed failure to recognize git repositories where `gitdir` was
expressed as a relative path.
- Fixed handling of gitignores in git repositories that use a separate
git dir.
```

## Parents

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

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