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

Method build_history_options

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

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

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