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)
| 362 | /// Append one tagged `.atomic/hook-errors.log` line. Best-effort: log I/O errors |
| 363 | /// are ignored (the operation already surfaces its own outcome). |
| 364 | fn append_shadow_log(repo_root: &Path, tag: &str, view: &str, detail: &str) { |
| 365 | use std::io::Write; |
| 366 | let log_path = repo_root.join(".atomic").join("hook-errors.log"); |
| 367 | let entry = format!( |
| 368 | "{} {} view={} {}\n", |
| 369 | chrono::Utc::now().to_rfc3339(), |
| 370 | tag, |
| 371 | view, |
| 372 | detail |
| 373 | ); |
| 374 | let _ = std::fs::OpenOptions::new() |
| 375 | .create(true) |
| 376 | .append(true) |
| 377 | .open(&log_path) |
| 378 | .and_then(|mut f| f.write_all(entry.as_bytes())); |
| 379 | } |
| 380 | |
| 381 | /// Return the first staged index path that is a git-excluded shadow / provenance |
| 382 | /// path (`.atomic/`, `.vault/`, or `.atomicignore`), or `None` if the candidate |
no test coverage detected