Commit 959144d
committed
fix(test): make gitops temp repo dir unique to avoid macOS parallel-init race
Two parallel tests in this process derived the temp dir from pid+nanos only.
macOS clock resolution is coarse, so both could compute the same nanos and share
one directory; the second `git init` then failed with "cannot copy template ...
.git/info/exclude: File exists". Append a per-call atomic counter so each repo
gets a unique path regardless of timing. Fixes the flaky macOS CI failure in
gitops::clear_cache_removes_dir.
# ── git-warden policy guide ──
# Write the commit message in English
# AI co-author trailers will be removed before commit1 parent 6bd8dc1 commit 959144d
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | | - | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
0 commit comments