From bb151eb67f88a51eb6e899e26e5d3e6e98ef7ebf Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:39:20 -0400 Subject: [PATCH] Fix a panic in the git store (cherry-pick #28590) (#28595) Cherry-picked Fix a panic in the git store (#28590) Closes #ISSUE Release Notes: - Fixed a panic that could occur when git statuses were updated. Co-authored-by: Cole Miller --- crates/project/src/git_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 53e2f1a10a4efe0c87985c06d737577901f46f71..9b6eb299d471016132ed2120396a755575b1d771 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -3975,7 +3975,7 @@ impl Repository { for (repo_path, status) in &*statuses.entries { changed_paths.remove(repo_path); if cursor.seek_forward(&PathTarget::Path(repo_path), Bias::Left, &()) { - if &cursor.item().unwrap().status == status { + if cursor.item().is_some_and(|entry| entry.status == *status) { continue; } }