Attempt to fix a panic in worktree scanning (#7128)

Somehow (and this should be investigated separately) we're ending up
with paths that look like: /path/to/project/../../path/to/dependency,
these pass the Ok(repo_path) = path.strip_prefix(), but then fail.

Release Notes:

- Fixed (hopefully) a panic that could occur due to path confusing in
git status
aee0f65b26Conrad Irwin committed on 1/31/2024, 3:10:52 AM· committed by GitHubparentdbb5fad
1 file changedLine totals unavailable