From a86647dcfc3e1dbd95083f0b898f83e7053431bb 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:34 -0400 Subject: [PATCH] Fix a panic in the git store (cherry-pick #28590) (#28594) 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 16ddf73e9c5df8b0f09f931658f7d7c738cc3ddb..78f1283922f5f86bfd1c099f594661f6aa6695ab 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -3857,7 +3857,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; } }