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

Method empty

atomic-cli/src/commands/diff/json.rs:51–59  ·  view source on GitHub ↗

The all-zero document, used when there is nothing to diff so that `--json` still emits valid parseable JSON.

(view: Option<&str>)

Source from the content-addressed store, hash-verified

49 /// The all-zero document, used when there is nothing to diff so that
50 /// `--json` still emits valid parseable JSON.
51 pub(super) fn empty(view: Option<&str>) -> Self {
52 Self {
53 schema_version: DIFF_JSON_SCHEMA_VERSION,
54 view: view.map(str::to_string),
55 change: None,
56 files: Vec::new(),
57 stats: JsonDiffStats::default(),
58 }
59 }
60}
61
62/// Identity and message of the change record under inspection.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected