pub struct CommitInvocation<'a> {
pub context: &'a GitContext,
pub environment: &'a [(OsString, OsString)],
pub cwd: &'a Path,
pub arguments: &'a [OsString],
pub subcommand_index: usize,
pub region: &'a CommitRegion,
pub config: &'a CliGitConfig,
pub controls: &'a Controls,
pub inherited_lease_valid: bool,
pub executable: &'a Path,
}Expand description
What: Everything the invocation fixes before the transaction starts. Why: The steps share one identity, one parsed commit region and one configuration; passing them together keeps a step from reading another invocation’s state.
In TS you’d write (pseudocode):
type CommitInvocation = { args; gitPath; cwd; region; policyOptions; concurrency };Fields§
§context: &'a GitContextReal Git, the child environment overlay, and the invocation’s global options.
environment: &'a [(OsString, OsString)]The invocation’s environment, read for leases and inherited configuration.
cwd: &'a PathThe effective invocation directory (the process directory moved by every -C).
arguments: &'a [OsString]The arguments with the wrapper’s controls removed.
subcommand_index: usizeThe index of commit within arguments.
region: &'a CommitRegionThe commit options Git’s table read.
config: &'a CliGitConfigThe configuration of the worktree.
controls: &'a ControlsThe wrapper controls given on the command line.
inherited_lease_valid: boolWhether this invocation runs under a valid outer preparation lease.
executable: &'a PathThis executable, which the hook entries link to.
Auto Trait Implementations§
impl<'a> Freeze for CommitInvocation<'a>
impl<'a> RefUnwindSafe for CommitInvocation<'a>
impl<'a> Send for CommitInvocation<'a>
impl<'a> Sync for CommitInvocation<'a>
impl<'a> Unpin for CommitInvocation<'a>
impl<'a> UnsafeUnpin for CommitInvocation<'a>
impl<'a> UnwindSafe for CommitInvocation<'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
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> ⓘ
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