From b1db21e10adc396a662259d0116c05db1092abfe Mon Sep 17 00:00:00 2001 From: extrawurst <776816+extrawurst@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:38:05 +0100 Subject: [PATCH] fix panic when opening submodule (#2896) this is caused by us dropping the git notify channel and creating a new one when opening the submodule. closes #2895 --- CHANGELOG.md | 1 + asyncgit/src/status.rs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abf7ab6..a7c6ee12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * use [tombi](https://github.com/tombi-toml/tombi) for all toml file formatting ### Fixes +* crash when opening submodule ([#2895](https://github.com/gitui-org/gitui/issues/2895)) * when staging the last file in a directory, the first item after the directory is no longer skipped [[@Tillerino](https://github.com/Tillerino)] ([#2748](https://github.com/gitui-org/gitui/issues/2748)) ## [0.28.1] - 2026-03-21 diff --git a/asyncgit/src/status.rs b/asyncgit/src/status.rs index 2516e8bd..9728c6f3 100644 --- a/asyncgit/src/status.rs +++ b/asyncgit/src/status.rs @@ -138,9 +138,10 @@ impl AsyncStatus { arc_generation.fetch_add(1, Ordering::Relaxed); arc_pending.fetch_sub(1, Ordering::Relaxed); - sender - .send(AsyncGitNotification::Status) - .expect("error sending status"); + if let Err(e) = sender.send(AsyncGitNotification::Status) + { + log::error!("send status error: {e}"); + } }); Ok(None)