pub struct Checkout {
pub nodes: HashSet<String>,
/* private fields */
}Expand description
The checkout references are checked against, with per-run caches so a
capture run spawns each git query once.
Fields§
§nodes: HashSet<String>Node ids known to the place (replica and this batch).
Implementations§
Source§impl Checkout
impl Checkout
pub fn new(root: &Path) -> Self
Sourcepub fn head_contains(&mut self, sha: &str) -> bool
pub fn head_contains(&mut self, sha: &str) -> bool
Whether HEAD is sha or a descendant of it. false for a commit
this clone does not have, a branch that diverged, or anything that
is not a hex commit id.
Sourcepub fn blob_bytes(&mut self, path: &str) -> Option<&[u8]>
pub fn blob_bytes(&mut self, path: &str) -> Option<&[u8]>
The file’s bytes at HEAD, None when it is not in HEAD’s tree.
Auto Trait Implementations§
impl Forget for Checkout
impl Freeze for Checkout
impl Move for Checkout
impl RefUnwindSafe for Checkout
impl Send for Checkout
impl Sync for Checkout
impl Unpin for Checkout
impl UnsafeUnpin for Checkout
impl UnwindSafe for Checkout
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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