diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 472dacc0ea..3afbcb1dd7 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -980,7 +980,11 @@ impl LocalWorktree { } } - while let Ok(snapshot) = snapshots_to_send_rx.recv().await { + while let Ok(mut snapshot) = snapshots_to_send_rx.recv().await { + while let Ok(newer_snapshot) = snapshots_to_send_rx.try_recv() { + snapshot = newer_snapshot; + } + let message = snapshot.build_update(&prev_snapshot, project_id, worktree_id, true); rpc.request(message).await?;