Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to tick-based updates #1657

Merged
merged 3 commits into from
Apr 29, 2023

Conversation

cruessler
Copy link
Contributor

This Pull Request fixes/closes #1444.

It changes the following:

  • This commit reintroduces code that was previously removed in favor of a notify-based update trigger. It turned out that notify-based updates can cause issues in larger repositories, so tick-based updates seemed like a safer default.

PR that introduced the notify-based watcher: #1310

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

This commit reintroduces code that was previously removed in favor of a
notify-based update trigger. It turned out that notify-based updates can
cause issues in larger repositories, so tick-based updates seemed like a
safer default.

extrawurst#1444
extrawurst#1310
Copy link
Owner

@extrawurst extrawurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this one ❤️

src/args.rs Outdated
@@ -15,6 +15,7 @@ use std::{
pub struct CliArgs {
pub theme: PathBuf,
pub repo_path: RepoPath,
pub notify_watcher: bool,
pub poll_watcher: bool,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poll_watcher should be deprecated by this, right? because it is the default

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we remove it? and people still call it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed your suggestion below and removed poll_watcher.

After the removal, clap prints an error when --poll is passed as an argument: error: unexpected argument '--poll' found.

src/args.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/main.rs Outdated
#[derive(Clone, Copy, PartialEq)]
enum Updater {
Ticker,
PollWatcher,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would sunset the notify based poll watcher entirely or do you see any point in keeping it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if it’s causing issues that are not fixable or unlikely to be fixed, it makes more sense to completely remove it.

@extrawurst extrawurst merged commit 370aff5 into extrawurst:master Apr 29, 2023
@cruessler cruessler deleted the default-to-polling branch April 29, 2023 15:51
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
* Default to tick-based updates

This commit reintroduces code that was previously removed in favor of a
notify-based update trigger. It turned out that notify-based updates can
cause issues in larger repositories, so tick-based updates seemed like a
safer default.

extrawurst#1444
extrawurst#1310

* Add FAQ entry for --watcher

* Remove --poll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove polling watcher
2 participants