pub fn stamp(
root: &Path,
req: &StampRequest,
) -> Result<EvidenceProvenance, Error>Expand description
Measure the checkout at root as the run req describes left it.
Refused, before anything is measured, when there is no commit, when an exclude is not a repository path, is a pattern, names the whole checkout or holds tracked files (an exclude names only the run’s own untracked outputs), and when the report is unreadable.
use majordomus_cli::evidence::{stamp, StampRequest};
let empty = tempfile::tempdir().unwrap();
let err = stamp(empty.path(), &StampRequest::default()).unwrap_err().to_string();
assert!(err.contains("no commit to measure"), "{err}");