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

Method build_options

atomic-cli/src/commands/record/provenance.rs:94–123  ·  view source on GitHub ↗

Build RecordOptions from command-line arguments.

(&self)

Source from the content-addressed store, hash-verified

92
93 /// Build RecordOptions from command-line arguments.
94 pub(super) fn build_options(&self) -> CliResult<RecordOptions> {
95 let algorithm = self.parse_algorithm()?;
96
97 let mut options = RecordOptions::new()
98 .with_all(self.all)
99 .include_untracked(self.all)
100 .with_algorithm(algorithm)
101 .with_skip_binary(self.skip_binary)
102 .allow_conflict_markers(self.allow_conflict_markers)
103 .resolve_name_conflicts(self.resolve_name_conflicts.clone())
104 .apply_after_record(!self.dry_run)
105 .save_to_store(!self.dry_run);
106
107 // Add specific files if provided
108 if !self.files.is_empty() {
109 options = options.paths(self.files.clone());
110 }
111
112 // Set max size if provided
113 if let Some(max_size) = self.max_size {
114 options = options.with_max_file_size(max_size);
115 }
116
117 // Add AI provenance if enabled
118 if let Some(provenance) = self.build_provenance() {
119 options = options.add_provenance(provenance);
120 }
121
122 Ok(options)
123 }
124}

Calls 15

save_to_storeMethod · 0.80
apply_after_recordMethod · 0.80
include_untrackedMethod · 0.80
build_provenanceMethod · 0.80
parse_algorithmMethod · 0.45
with_skip_binaryMethod · 0.45
with_algorithmMethod · 0.45
with_allMethod · 0.45
cloneMethod · 0.45
is_emptyMethod · 0.45