pub struct RefFilesLayout<'a> {
pub git_dir: &'a Path,
pub common_dir: &'a Path,
pub ref_format: RefFormat,
pub object_format: &'a str,
}Expand description
What:
Where one worktree’s ref files live and what format they are in.
Why:
The per-worktree HEAD is in the Git directory,
the branches are in the common directory,
and the length of an object name depends on the object format.
In TS you’d write (pseudocode):
type RefFilesLayout = { gitDir: string; commonDir: string; refFormat: 'files' | 'reftable'; objectFormat: string };Fields§
§git_dir: &'a PathAbsolute Git directory of the owning worktree.
common_dir: &'a PathAbsolute common Git directory.
ref_format: RefFormatRef storage backend.
object_format: &'a strObject hash algorithm name as rev-parse --show-object-format spells it.
Trait Implementations§
Source§impl<'a> Clone for RefFilesLayout<'a>
impl<'a> Clone for RefFilesLayout<'a>
impl<'a> Copy for RefFilesLayout<'a>
Auto Trait Implementations§
impl<'a> Freeze for RefFilesLayout<'a>
impl<'a> RefUnwindSafe for RefFilesLayout<'a>
impl<'a> Send for RefFilesLayout<'a>
impl<'a> Sync for RefFilesLayout<'a>
impl<'a> Unpin for RefFilesLayout<'a>
impl<'a> UnsafeUnpin for RefFilesLayout<'a>
impl<'a> UnwindSafe for RefFilesLayout<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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