Use correct worktree when getting permalink to line (#8888)

Previously this code would call `project.visible_worktrees(cx).next`
which might not necessarily return the worktree matching the currently
open file.

What this change does is it adds `get_repo` method on `Project` that
allows us to get the `GitRepository` for the current buffer.

Release Notes:

- Fixed `open permalink to line` not working when multiple folders are
added to the project.

Co-authored-by: Mikayla <mikayla@zed.dev>
2b8b913b6bThorsten Ball committed on 3/5/2024, 3:59:00 PM· committed by GitHubparentd286c56
3 files changedLine totals unavailable