zed/crates/worktree
Piotr Osiewicz 14bf07c916
worktree: Fix race condition when a root of worktree is .git directory (#12995)
It was possible to unload a root of worktree when it was a .git
directory; due to that, test_fs_events_in_dot_git_worktree was sometimes
stuck in an infinite loop on CI.

The gist of an issue is that when .git dir is a root dir, then modifying
a file within this directory could sometimes unload the .git dir; the
test went into an infinite loop when the first event in an filesystem
stream was not the event for the file creation, but for a dir
modification. In that case we'd unload the root directory and a
subsequent event for file creation would never be registered, leading to
the test being stuck waiting for it to happen.

This commit alleviates it by special-casing worktrees rooted in .git
directories.



Release Notes:

- Fixed a possible hang when opening a worktree in .git directory.
2024-06-13 19:24:41 +02:00
..
src worktree: Fix race condition when a root of worktree is .git directory (#12995) 2024-06-13 19:24:41 +02:00
Cargo.toml Refactor: Make it possible to share a remote worktree (#12775) 2024-06-07 12:53:01 -07:00
LICENSE-GPL Rename 'project_core' crate to 'worktree', make it just about worktrees (#9189) 2024-03-11 11:35:27 -07:00