MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / show_change_diff_from_file_ops

Method show_change_diff_from_file_ops

atomic-cli/src/commands/diff/helpers.rs:448–458  ·  view source on GitHub ↗

Show diff using the semantic layer (FileOps). This is the preferred path - it displays line-level and token-level changes directly from the stored CRDT operations, without recomputing. Building the `Vec ` is delegated to the reusable [`change_file_diffs`] builder; this method applies the positional file filter and prints, preserving `atomic diff -c ` output exactly.

(
        &self,
        repo: &Repository,
        change: &Change,
        change_hash: &Hash,
        config: &DiffOutputConfig,
    )

Source from the content-addressed store, hash-verified

446 /// [`change_file_diffs`] builder; this method applies the positional file
447 /// filter and prints, preserving `atomic diff -c <hash>` output exactly.
448 fn show_change_diff_from_file_ops(
449 &self,
450 repo: &Repository,
451 change: &Change,
452 change_hash: &Hash,
453 config: &DiffOutputConfig,
454 ) -> CliResult<()> {
455 let (file_diffs, stats) = change_file_diffs(repo, change, change_hash, config)?;
456 let (file_diffs, stats) = self.filter_file_diffs(file_diffs, stats);
457 self.print_change_file_diffs(change, change_hash, config, file_diffs, stats)
458 }
459
460 /// Render a recorded change's computed file diffs — the header for the
461 /// human unified form, then the configured format. Shared by the local

Callers 1

show_change_diffMethod · 0.80

Calls 3

filter_file_diffsMethod · 0.80
change_file_diffsFunction · 0.70

Tested by

no test coverage detected