A bare temp git repo with one commit. Not indexed by tracedecay — these tests exercise the watcher's registration/debounce plumbing, which runs regardless of whether a store exists (a sync on a non-indexed project is a cheap no-op).
()
| 111 | /// regardless of whether a store exists (a sync on a non-indexed project is |
| 112 | /// a cheap no-op). |
| 113 | fn temp_repo() -> tempfile::TempDir { |
| 114 | let dir = tempfile::tempdir().unwrap(); |
| 115 | let root = dir.path(); |
| 116 | git(root, &["init", "-b", "main"]); |
| 117 | std::fs::write(root.join("a.txt"), "hello\n").unwrap(); |
| 118 | git(root, &["add", "."]); |
| 119 | git(root, &["commit", "-m", "init"]); |
| 120 | dir |
| 121 | } |
| 122 | |
| 123 | async fn ready_registered_state(watcher: &GitWatcher, repo: &Path) -> Arc<WatchState> { |
| 124 | let canonical = repo.canonicalize().unwrap_or_else(|_| repo.to_path_buf()); |
no test coverage detected