This commit is contained in:
Ani Betts 2024-05-15 17:13:44 +02:00
parent ddc2cfeb67
commit 2ff2b1f7ec
No known key found for this signature in database
5 changed files with 12 additions and 17 deletions

View File

@ -1,11 +1,8 @@
use std::io::Write;
use std::path::{Path, PathBuf};
use anyhow::Result;
use bstr::BString;
use gix::dir::walk::EmissionMode;
use gix::tempfile::create_dir::Retries;
use gix::tempfile::{AutoRemove, ContainingDirectory};
use walkdir::WalkDir;
// Returns an ordered list of relative paths for files inside a directory recursively.

View File

@ -91,7 +91,7 @@ unsafe impl super::GitExecutor for TokioExecutor {
#[cfg(windows)]
{
cmd.envs(envs.iter().map(|(k, v)| {
let v = v.replace("\\", "\\\\");
let v = v.replace('\\', "\\\\");
(k, v)
}));
}

View File

@ -13,9 +13,8 @@
clippy::too_many_lines
)]
use std::{future::IntoFuture, path::PathBuf};
use std::path::PathBuf;
use futures::FutureExt;
use gitbutler_core::{assets, git, storage};
use gitbutler_tauri::{
app, askpass, commands, github, keys, logs, menu, projects, undo, users, virtual_branches,

View File

@ -223,8 +223,7 @@ impl<T: FileIdCache> DebounceDataInner<T> {
kind_index.insert(event.kind, events_expired.len());
events_expired.push(event);
} else {
if flush_all {
} else if flush_all {
tracing::debug!("Flushing event! {:?}", event.event);
events_expired.push(event);
} else {
@ -232,7 +231,6 @@ impl<T: FileIdCache> DebounceDataInner<T> {
break;
}
}
}
if !queue.events.is_empty() {
queues_remaining.insert(path, queue);

View File

@ -1,6 +1,6 @@
use std::{collections::HashSet, sync::Arc};
use std::path::Path;
use std::time::Duration;
use std::{collections::HashSet, sync::Arc};
use crate::debouncer::Debouncer;
use crate::debouncer_cache::FileIdMap;
@ -56,7 +56,8 @@ pub fn spawn(
out: tokio::sync::mpsc::UnboundedSender<InternalEvent>,
) -> Result<Arc<Debouncer<RecommendedWatcher, FileIdMap>>> {
let (notify_tx, notify_rx) = std::sync::mpsc::channel();
let mut debouncer = Arc::new(new_debouncer(
let mut debouncer = Arc::new(
new_debouncer(
DEBOUNCE_TIMEOUT,
Some(TICK_RATE),
Some(FLUSH_AFTER_EMPTY),