pub fn cmd_diff(
mana_dir: &Path,
id: &str,
output: DiffOutput,
no_color: bool,
) -> Result<()>Expand description
Show git diff of what changed for a specific unit.
Strategy:
- Look for commits with
unit-{id}in the message (preferred auto-commit convention), plus legacyClose unit {id}messages. If found, show the combined diff for those commits. - Fall back to timestamp-based diffing: find the commit closest to claimed_at and diff to closed_at (or HEAD if still open).
- If the unit has a checkpoint SHA, use that as the base.