Fix the filtering of index.lock + COMMIT_MESSAGE FS events to work in linked worktrees (#57763)

Zed reloads a lot of data about a git repository any time any file
changes inside of the `.git` directory, with the exception of a few
known paths that we know do not warrant a reload, such as `index.lock`
and `COMMIT_MESSAGE`. Previously, we ignored FS events for those files,
but we used a specific path that only worked for the main worktree. This
caused a lot of unnecessary reloads when using linked worktrees. Now we
ignore those files in a general way, by their filename, so that the
optimization applies to linked worktrees as well.

@cole-miller Noticed this bug.

Release Notes:

- Fixed unnecessary reloading of Git state that could occur when editing
in linked worktrees.
4129fc87d8Max Brunsfeld committed on 5/27/2026, 12:04:30 AM· committed by GitHubparent53ed11b
12 files changedLine totals unavailable