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:336–346  ·  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

334 /// [`change_file_diffs`] builder; this method applies the positional file
335 /// filter and prints, preserving `atomic diff -c <hash>` output exactly.
336 fn show_change_diff_from_file_ops(
337 &self,
338 repo: &Repository,
339 change: &Change,
340 change_hash: &Hash,
341 config: &DiffOutputConfig,
342 ) -> CliResult<()> {
343 let (file_diffs, stats) = change_file_diffs(repo, change, change_hash, config)?;
344 let (file_diffs, stats) = self.filter_file_diffs(file_diffs, stats);
345 self.print_change_file_diffs(change, change_hash, config, file_diffs, stats)
346 }
347
348 fn print_change_file_diffs(
349 &self,

Callers 1

show_change_diffMethod · 0.80

Calls 3

change_file_diffsFunction · 0.85
filter_file_diffsMethod · 0.80

Tested by

no test coverage detected