pub struct HookPlanInputs<'a> {
pub context: &'a GitContext,
pub cwd: &'a Path,
pub global_arguments: &'a [OsString],
pub common_directory: &'a Path,
pub worktree_root: &'a Path,
pub lease: &'a str,
pub concurrent_commits: bool,
pub inherited_lease_valid: bool,
pub environment: &'a [(OsString, OsString)],
}Expand description
What: The inputs of one plan computation. Why: Named fields keep the many inputs apart; the context carries the caller’s global options as its global prefix, so every config read sees them.
In TS you’d write (pseudocode):
computeHookDispatchPlan({ gitPath, cwd, globalArgs, commonDir, worktreeRoot, lease, ... });Fields§
§context: &'a GitContextReal Git and the caller’s global options.
cwd: &'a PathOwning worktree directory where the config reads run.
global_arguments: &'a [OsString]Caller’s global options, whose -c values join the config parameters.
common_directory: &'a PathAbsolute common Git directory.
worktree_root: &'a PathAbsolute worktree root.
lease: &'a strPreparation lease token text, formatted by new_preparation_lease.
concurrent_commits: boolhooks.concurrentCommits.
inherited_lease_valid: boolWhether this invocation runs under a valid outer preparation lease.
environment: &'a [(OsString, OsString)]Caller environment, whose GIT_CONFIG_PARAMETERS is inherited.
Trait Implementations§
Source§impl<'a> Clone for HookPlanInputs<'a>
impl<'a> Clone for HookPlanInputs<'a>
impl<'a> Copy for HookPlanInputs<'a>
Auto Trait Implementations§
impl<'a> Freeze for HookPlanInputs<'a>
impl<'a> RefUnwindSafe for HookPlanInputs<'a>
impl<'a> Send for HookPlanInputs<'a>
impl<'a> Sync for HookPlanInputs<'a>
impl<'a> Unpin for HookPlanInputs<'a>
impl<'a> UnsafeUnpin for HookPlanInputs<'a>
impl<'a> UnwindSafe for HookPlanInputs<'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