worktree: Refresh all repositories sharing a changed git directory (#60664)

update_git_repositories mapped a changed .git path to a repository with
find_map, so when several repositories share a git directory - a main
checkout plus one of its linked worktrees in the same project worktree -
a ref update under the shared common dir only bumped git_dir_scan_id on
whichever repository iterated first, leaving the others stale until an
unrelated event happened to refresh them. Collect every matching
repository and bump each one.

---

Release Notes:

- N/A or Added/Fixed/Improved ...
11d216d8bfLukas Wirth committed on 7/9/2026, 12:41:50 PM· committed by GitHubparente2d41c4
2 files changedLine totals unavailable