Append one tagged `.atomic/hook-errors.log` line. Best-effort: log I/O errors are ignored (the operation already surfaces its own outcome).
(repo_root: &Path, tag: &str, view: &str, detail: &str)
| 2350 | /// Append one tagged `.atomic/hook-errors.log` line. Best-effort: log I/O errors |
| 2351 | /// are ignored (the operation already surfaces its own outcome). |
| 2352 | fn append_shadow_log(repo_root: &Path, tag: &str, view: &str, detail: &str) { |
| 2353 | use std::io::Write; |
| 2354 | let log_path = repo_root.join(".atomic").join("hook-errors.log"); |
| 2355 | let entry = format!( |
| 2356 | "{} {} view={} {}\n", |
| 2357 | chrono::Utc::now().to_rfc3339(), |
| 2358 | tag, |
| 2359 | view, |
| 2360 | detail |
| 2361 | ); |
| 2362 | let _ = std::fs::OpenOptions::new() |
| 2363 | .create(true) |
| 2364 | .append(true) |
| 2365 | .open(&log_path) |
| 2366 | .and_then(|mut f| f.write_all(entry.as_bytes())); |
| 2367 | } |
| 2368 | |
| 2369 | /// Return the first staged index path that is a git-excluded shadow / provenance |
| 2370 | /// path (`.atomic/`, `.vault/`, or `.atomicignore`), or `None` if the candidate |
no test coverage detected