Convert git status calculation to use Entry IDs as the key instead of repo relative paths

This commit is contained in:
Mikayla Maki
2023-05-10 17:37:36 -07:00
committed by Mikayla Maki
parent 94a0de4c9f
commit f935047ff2
7 changed files with 90 additions and 59 deletions
+2 -1
View File
@@ -2755,7 +2755,8 @@ async fn test_git_status_sync(
let worktree = worktrees[0].clone();
let snapshot = worktree.read(cx).snapshot();
let root_entry = snapshot.root_git_entry().unwrap();
assert_eq!(root_entry.status_for(&snapshot, file), status);
let file_entry_id = snapshot.entry_for_path(file).unwrap().id;
assert_eq!(root_entry.status_for(file_entry_id), status);
}
// Smoke test status reading