pub struct LocalSourceState {
pub short_hash: Option<String>,
pub is_dirty: bool,
pub is_git: bool,
}Expand description
Result of inspect_local_source_state — git hash and dirty/git
classification of a canonical source-tree path. Pulled out of
local_source so the post-build dirty re-check (a second call
from crate::cli::kernel_build_pipeline) reuses the exact same
gix path.
Fields§
§short_hash: Option<String>HEAD short hash (7 chars). None when the tree is dirty
(HEAD doesn’t describe the actual source) or non-git (no
HEAD at all). Mirrors the git_hash field on
AcquiredSource::kernel_source for crate::cache::KernelSource::Local.
is_dirty: boolTracked-file dirt: HEAD-vs-index disagreement OR
index-vs-worktree disagreement. Always true for non-git
trees (dirty detection is impossible without git, so the
pessimistic stance is dirty).
is_git: booltrue when gix::discover succeeded (the tree is a git
repo); false otherwise. Lets the cache-skip hint branch
on whether commit / stash is actionable.
Trait Implementations§
Source§impl Clone for LocalSourceState
impl Clone for LocalSourceState
Source§fn clone(&self) -> LocalSourceState
fn clone(&self) -> LocalSourceState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for LocalSourceState
impl RefUnwindSafe for LocalSourceState
impl Send for LocalSourceState
impl Sync for LocalSourceState
impl Unpin for LocalSourceState
impl UnwindSafe for LocalSourceState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more