fix crash interfering of other git processes (closes #271)

This commit is contained in:
Stephan Dilly 2020-09-27 19:11:03 +02:00
parent a991810f01
commit 4b56a636ff
2 changed files with 10 additions and 5 deletions

View File

@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
![tree](assets/compact-tree.png)
### Fixed
- crash when changing git repo while gitui is open ([#271](https://github.com/extrawurst/gitui/issues/271))
## [0.10.1] - 2020-09-01
### Fixed

View File

@ -120,20 +120,22 @@ impl AsyncStatus {
self.pending.fetch_add(1, Ordering::Relaxed);
rayon_core::spawn(move || {
Self::fetch_helper(
let ok = Self::fetch_helper(
status_type,
include_untracked,
hash_request,
arc_current,
arc_last,
)
.expect("failed to fetch status");
.is_ok();
arc_pending.fetch_sub(1, Ordering::Relaxed);
sender
.send(AsyncNotification::Status)
.expect("error sending status");
if ok {
sender
.send(AsyncNotification::Status)
.expect("error sending status");
}
});
Ok(None)