Skip to main content

cmd_diff

Function cmd_diff 

Source
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:

  1. Look for commits with unit-{id} in the message (preferred auto-commit convention), plus legacy Close unit {id} messages. If found, show the combined diff for those commits.
  2. Fall back to timestamp-based diffing: find the commit closest to claimed_at and diff to closed_at (or HEAD if still open).
  3. If the unit has a checkpoint SHA, use that as the base.