mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Merge 5d95857ea9 into 8619c07f3f
This commit is contained in:
commit
e5af0cb775
1 changed files with 14 additions and 4 deletions
|
|
@ -145,6 +145,13 @@ impl AsyncLog {
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
pub fn invalidate(&self) {
|
||||||
|
if let Ok(mut head) = self.current_head.lock() {
|
||||||
|
*head = None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub fn fetch(&self) -> Result<FetchStatus> {
|
pub fn fetch(&self) -> Result<FetchStatus> {
|
||||||
self.background.store(false, Ordering::Relaxed);
|
self.background.store(false, Ordering::Relaxed);
|
||||||
|
|
@ -176,18 +183,21 @@ impl AsyncLog {
|
||||||
rayon_core::spawn(move || {
|
rayon_core::spawn(move || {
|
||||||
scope_time!("async::revlog");
|
scope_time!("async::revlog");
|
||||||
|
|
||||||
Self::fetch_helper(
|
if let Err(e) = Self::fetch_helper(
|
||||||
&repo_path,
|
&repo_path,
|
||||||
&arc_current,
|
&arc_current,
|
||||||
&arc_background,
|
&arc_background,
|
||||||
&sender,
|
&sender,
|
||||||
filter,
|
filter,
|
||||||
)
|
) {
|
||||||
.expect("failed to fetch");
|
log::error!("revlog fetch_helper: {e}");
|
||||||
|
}
|
||||||
|
|
||||||
arc_pending.store(false, Ordering::Relaxed);
|
arc_pending.store(false, Ordering::Relaxed);
|
||||||
|
|
||||||
Self::notify(&sender);
|
if let Err(e) = sender.send(AsyncGitNotification::Log) {
|
||||||
|
log::error!("revlog notify error: {e}");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok(FetchStatus::Started)
|
Ok(FetchStatus::Started)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue