# workspace: Do not scan for \.gitignore files if a \.git directory is encountered along the way \(\#3135\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 31241f48bef316eacd5c0e874a96357755f12948

Requested commit: 31241f48bef316eacd5c0e874a96357755f12948

Commit: 31241f48bef316eacd5c0e874a96357755f12948

Tree: 30bb1a1aa07fbbf05e98f55639405835041f3461

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
workspace: Do not scan for .gitignore files if a .git directory is encountered along the way (#3135)

Partially fixes zed-industries/community#575

This PR will see one more fix to the case I've spotted while working on
this: namely, if a project has several nested repositories, e.g for a
structure:
/a
/a/.git/
/a/.gitignore
/a/b/
/a/b/.git/
/a/b/.gitignore

/b/ should not account for a's .gitignore at all - which is sort of
similar to the fix in commit #c416fbb, but for the paths in the project.

The release note is kinda bad, I'll try to reword it too.
- [ ] Improve release note.
- [x] Address the same bug for project files.

Release Notes:
- Fixed .gitignore files beyond the first .git directory being respected
by the worktree (zed-industries/community#575).
```

## Parents

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

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