git: Put pending ops container out of snapshot (#43061)

This also fixes staging checkbox flickering.

Release Notes:

- Fixed staging checkbox flickering sporadically in the Git panel.
This commit is contained in:
Jakub Konka
2025-11-19 14:56:10 +00:00
committed by GitHub
parent 39f8aefa8c
commit a42676b6bb
3 changed files with 59 additions and 49 deletions
+2 -8
View File
@@ -2713,14 +2713,8 @@ impl GitPanel {
self.single_staged_entry = single_staged_entry;
}
}
} else if repo
.pending_ops_by_path
.summary()
.item_summary
.staging_count
== 1
{
self.single_staged_entry = repo.pending_ops_by_path.iter().find_map(|ops| {
} else if repo.pending_ops_summary().item_summary.staging_count == 1 {
self.single_staged_entry = repo.pending_ops().find_map(|ops| {
if ops.staging() {
repo.status_for_path(&ops.repo_path)
.map(|status| GitStatusEntry {