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

Method build_history_options

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

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

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