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

Method build_history_options

atomic-cli/src/commands/log/command.rs:194–218  ·  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

192 ///
193 /// `HistoryOptions` configured according to command settings.
194 pub(crate) fn build_history_options(&self) -> HistoryOptions {
195 let mut options = HistoryOptions::new().load_headers(true);
196
197 if let Some(count) = self.count {
198 options = options.limit(count);
199 }
200
201 if let Some(ref view) = self.view {
202 options = options.view(view.clone());
203 }
204
205 if self.tags_only {
206 options = options.tagged_only(true);
207 }
208
209 if let Some(from) = self.from {
210 options = options.from_sequence(from);
211 }
212
213 if self.all {
214 options = options.include_inherited(true);
215 }
216
217 options
218 }
219
220 /// Get the hash display length based on settings.
221 ///

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