#[non_exhaustive]pub struct Options {Show 16 fields
pub long_window_secs: i64,
pub recent_window_secs: i64,
pub reference: String,
pub full_history: bool,
pub include_merges: bool,
pub follow_renames: bool,
pub exclude_bots: bool,
pub bot_pattern: String,
pub as_of: Option<i64>,
pub risk_formula: RiskFormula,
pub emit_author_details: bool,
pub author_hash_key: Option<AuthorHashKey>,
pub include_deleted: bool,
pub compute_bus_factor: bool,
pub bus_factor_threshold: f64,
pub file_types: FileTypeScope,
}vcs-git only.Expand description
Configuration for a single change-history walk.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.long_window_secs: i64Long observation window, in seconds (default ≈ 365 days).
recent_window_secs: i64Recent observation window, in seconds (default 90 days).
reference: StringRevision to start the walk from (default HEAD).
full_history: boolWalk the full commit DAG rather than first-parent only.
include_merges: boolInclude merge commits (default: skip them).
follow_renames: boolFollow file renames across history (default: on).
exclude_bots: boolExclude bot author identities (default: on).
bot_pattern: StringRegex matched against author name/email to detect bots.
as_of: Option<i64>Reference “now” as a Unix timestamp for reproducible snapshots
(--as-of). None means wall-clock time at walk start.
risk_formula: RiskFormulaWhich composite score to compute.
Emit SHA-256-hashed canonical author identities (default: off — author identities never leave the process otherwise).
Optional secret key that hardens emit_author_details into a keyed
HMAC (issue #956). None (the default) emits the bare SHA-256
pseudonym. Has no effect unless emit_author_details is set. The
key is a finalization-time concern (like emit_author_details
itself), so it never enters the persistent-cache fingerprint: the
same cached walk re-finalizes under any key without a re-walk (see
AuthorId::emit_hashed).
include_deleted: boolEmit stats for files deleted at the target ref (default: off).
compute_bus_factor: boolCompute the directory- / repo-level bus-factor aggregate from the
walk (issue #332). Default off: it retains per-file authorship
beyond the per-file Stats, which the
repeated JIT-prior and per-file-injection walks neither need nor
should pay for.
bus_factor_threshold: f64Coverage (abandonment) threshold for the bus factor, in (0, 1)
— the fraction of files that must be orphaned for the greedy
removal to stop (default DEFAULT_BUS_FACTOR_THRESHOLD, 0.5
per Avelino). Ignored unless compute_bus_factor is set.
file_types: FileTypeScopeWhich tracked files to rank (issue #576). Defaults to
FileTypeScope::Metrics — only files bca has metrics for — so
high-churn non-source files do not dominate the risk ranking and
the change-history view aligns with the AST hotspot tables.
Implementations§
Source§impl Options
impl Options
Sourcepub fn long_window_days(&self) -> u32
pub fn long_window_days(&self) -> u32
Long window expressed in whole days (for the serialized
long_window_days field and the new_file/age cap).
Sourcepub fn recent_window_days(&self) -> u32
pub fn recent_window_days(&self) -> u32
Recent window expressed in whole days.