diff options
author | extrawurst <mail@rusticorn.com> | 2022-11-21 18:09:08 +0100 |
---|---|---|
committer | extrawurst <mail@rusticorn.com> | 2022-11-21 18:09:08 +0100 |
commit | bbcadcb5d1644c49da7d86187ef9affd33f95da2 (patch) | |
tree | 62165144fbdeb5460fd1d0a376fa439b56dee392 /src/main.rs | |
parent | 8cdb02349f8d1a96498ea7fffd9547777a511e04 (diff) |
threaded watcher creation and arg for config
new argument `polling` allows to force watcher to use polling instead of file system events.
this should address the issue in #1436 and maybe even #1437
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 6563a372..6a45b857 100644 --- a/src/main.rs +++ b/src/main.rs @@ -150,6 +150,7 @@ fn main() -> Result<()> { theme, key_config.clone(), &input, + cliargs.poll_watcher, &mut terminal, )?; @@ -170,13 +171,17 @@ fn run_app( theme: Theme, key_config: KeyConfig, input: &Input, + poll_watcher: bool, terminal: &mut Terminal<CrosstermBackend<io::Stdout>>, ) -> Result<QuitState, anyhow::Error> { let (tx_git, rx_git) = unbounded(); let (tx_app, rx_app) = unbounded(); let rx_input = input.receiver(); - let watcher = RepoWatcher::new(repo_work_dir(&repo)?.as_str())?; + let watcher = RepoWatcher::new( + repo_work_dir(&repo)?.as_str(), + poll_watcher, + ); let rx_watcher = watcher.receiver(); let spinner_ticker = tick(SPINNER_INTERVAL); |