Don't create repos for invisible worktrees (#27894)

Closes #ISSUE

Release Notes:

- Fixed git repositories being added for files outside the project
8ac4cbcbb9Cole Miller committed on 4/2/2025, 3:11:12 PM· committed by GitHubparentd82bf13
2 files changedLine totals unavailable