agent_trace/commands/diff.rs
1use crate::observability::CliOutput;
2use crate::store::Store;
3use anyhow::Result;
4use std::path::Path;
5
6pub fn run(
7 store_root: &Path,
8 file: &Path,
9 v1: Option<u32>,
10 v2: Option<u32>,
11 output: &dyn CliOutput,
12) -> Result<()> {
13 let store = Store::open(store_root)?;
14 let diff = store.git.diff_file(file, v1, v2)?;
15 output.line(&diff)?;
16 Ok(())
17}