git: Do not rescan .git on fsmonitor events (#18326)

Fixes #16404 by ignoring events coming from
.git/fsmonitor--daemon/cookies subdirectory.

Closes #16404

Release Notes:

- Improved performance in repositories using Git fsmonitor--daemon
feature.
This commit is contained in:
Piotr Osiewicz 2024-09-25 11:34:27 +02:00 committed by GitHub
parent 7bb510971a
commit 623a6eca75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 2 deletions

View file

@ -18,6 +18,9 @@ pub mod repository;
pub mod status;
pub static DOT_GIT: LazyLock<&'static OsStr> = LazyLock::new(|| OsStr::new(".git"));
pub static COOKIES: LazyLock<&'static OsStr> = LazyLock::new(|| OsStr::new("cookies"));
pub static FSMONITOR_DAEMON: LazyLock<&'static OsStr> =
LazyLock::new(|| OsStr::new("fsmonitor--daemon"));
pub static GITIGNORE: LazyLock<&'static OsStr> = LazyLock::new(|| OsStr::new(".gitignore"));
#[derive(Clone, Copy, Eq, Hash, PartialEq)]