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

Method build_history_options

atomic-cli/src/commands/log/command.rs:213–237  ·  view source on GitHub ↗

Build history options from command settings. Converts the command's settings into `HistoryOptions` for querying the repository. # Returns `HistoryOptions` configured according to command settings.

(&self)

Source from the content-addressed store, hash-verified

211 ///
212 /// `HistoryOptions` configured according to command settings.
213 pub(crate) fn build_history_options(&self) -> HistoryOptions {
214 let mut options = HistoryOptions::new().load_headers(true);
215
216 if let Some(count) = self.count {
217 options = options.limit(count);
218 }
219
220 if let Some(ref view) = self.view {
221 options = options.view(view.clone());
222 }
223
224 if self.tags_only {
225 options = options.tagged_only(true);
226 }
227
228 if let Some(from) = self.from {
229 options = options.from_sequence(from);
230 }
231
232 if self.all {
233 options = options.include_inherited(true);
234 }
235
236 options
237 }
238
239 /// Get the hash display length based on settings.
240 ///

Calls 7

load_headersMethod · 0.80
limitMethod · 0.80
tagged_onlyMethod · 0.80
include_inheritedMethod · 0.80
viewMethod · 0.45
cloneMethod · 0.45
from_sequenceMethod · 0.45