Process-wide lock around any write to the underlying git repo. Why: under the single-repo layout, multiple trace folders share one outer `.git`. Two concurrent `trace` processes will both: (a) write `index.lock` at the same time (libgit2 returns `Locked`), and (b) race HEAD between `revparse` and `commit` (libgit2 returns "current tip is not the first parent"). libgit2's per-process index lock al
| 20 | /// out of scope. Idempotent: re-entering from the same process serializes |
| 21 | /// via the OS, which is what we want. |
| 22 | struct CommitLock { |
| 23 | _file: std::fs::File, |
| 24 | } |
| 25 | |
| 26 | impl CommitLock { |
| 27 | fn acquire(repo: &Repository) -> Result<Self> { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…