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

Function status_options_domain

libatomic/src/daemon/convert.rs:66–89  ·  view source on GitHub ↗

Wire `StatusOptions` → domain `StatusOptions`. `None` means every default; inside a present message, each unset wrapper resolves to that field's domain default (atomic-repository/src/status.rs:677), so a partial message is a full message with the gaps filled by the defaults — never by whatever the handler happened to prefer.

(
    options: Option<pb::StatusOptions>,
)

Source from the content-addressed store, hash-verified

64/// partial message is a full message with the gaps filled by the defaults
65/// — never by whatever the handler happened to prefer.
66pub fn status_options_domain(
67 options: Option<pb::StatusOptions>,
68) -> atomic_repository::status::StatusOptions {
69 let defaults = atomic_repository::status::StatusOptions::default();
70 let Some(options) = options else {
71 return defaults;
72 };
73 atomic_repository::status::StatusOptions {
74 include_untracked: options
75 .include_untracked
76 .unwrap_or(defaults.include_untracked),
77 include_ignored: options.include_ignored.unwrap_or(defaults.include_ignored),
78 path_filters: options
79 .path_filters
80 .into_iter()
81 .map(std::path::PathBuf::from)
82 .collect(),
83 respect_ignore_files: options
84 .respect_ignore_files
85 .unwrap_or(defaults.respect_ignore_files),
86 hash_contents: options.hash_contents.unwrap_or(defaults.hash_contents),
87 ..defaults
88 }
89}
90
91/// Intent lifecycle strings (vault_intent_*) ↔ the proto entity status.
92pub fn intent_status_to_proto(status: &str) -> Option<pb::VaultEntityStatus> {

Callers 3

statusMethod · 0.85

Calls 2

collectMethod · 0.45
into_iterMethod · 0.45