Whether git shadow sync is established for this repo (the `.git/info/exclude` carries Atomic's shadow patterns, written by import/push). Used to gate the view-switch git-follow so we never touch HEAD in a plain (non-shadow) repo.
(git_repo: &GitRepository)
| 94 | /// carries Atomic's shadow patterns, written by import/push). Used to gate the |
| 95 | /// view-switch git-follow so we never touch HEAD in a plain (non-shadow) repo. |
| 96 | fn shadow_sync_active(git_repo: &GitRepository) -> bool { |
| 97 | let exclude = git_repo.path().join("info").join("exclude"); |
| 98 | std::fs::read_to_string(exclude) |
| 99 | .map(|c| c.lines().any(|l| l.trim() == "/.atomic/")) |
| 100 | .unwrap_or(false) |
| 101 | } |
| 102 | |
| 103 | /// Acquire the repo-scoped shadow-commit lock, or return `None` (a no-op skip) |
| 104 | /// if a shadow materialize/commit is already in flight (SPEC §4.3 / Principle 5). |
no test coverage detected