Fix permalink-to-line when Git repo root and worktree dir don't coincide (#22003)
Closes #21505. This should work if the git dir is an ancestor of the worktree dir or vice versa. Release Notes: - Fixed GitHub permalink-to-line actions when worktree dir and Git dir aren't the same
This commit is contained in:
parent
1e2fa3b022
commit
2094d50514
4 changed files with 91 additions and 8 deletions
|
@ -2396,7 +2396,6 @@ impl Snapshot {
|
|||
.map(|(path, entry)| (&path.0, entry))
|
||||
}
|
||||
|
||||
/// Get the repository whose work directory contains the given path.
|
||||
pub fn repository_for_work_directory(&self, path: &Path) -> Option<RepositoryEntry> {
|
||||
self.repository_entries
|
||||
.get(&RepositoryWorkDirectory(path.into()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue