pub struct HookDispatchPlan {
pub git_path: String,
pub disabled_events: Vec<String>,
pub config_parameters: ConfigParameters,
pub worktree_root: String,
pub lease: String,
pub hook_lock_path: String,
pub skip_hook_lock: bool,
pub named_hooks_possible: bool,
}Expand description
What:
The plan written to <transaction>/hooks/plan.json.
Why:
Both dispatchers and the lease validator read this one record,
so every field keeps the incumbent’s name and meaning.
In TS you’d write (pseudocode):
type HookDispatchPlan = { schemaVersion: 1; gitPath: string; disabledEvents: string[]; ... };Fields§
§git_path: StringAbsolute real Git executable the dispatcher runs git hook run with.
disabled_events: Vec<String>Events the user disabled with hook.<event>.enabled=false, in the silenced list’s order.
config_parameters: ConfigParametersCaller’s config parameters including its global -c options.
worktree_root: StringAbsolute worktree root exported as GIT_WORK_TREE.
lease: StringPreparation lease exported to hook descendants.
hook_lock_path: StringAbsolute hook lock directory.
skip_hook_lock: boolWhether hooks skip the hook lock.
named_hooks_possible: boolWhether the configuration may define hooks by name (hook.<name>.event or .command), which run for their
event whatever the hooks directory holds; true when the configuration was not inspected.
Not recorded in plan.json: the dispatchers never read it, and a plan read back says true.
Trait Implementations§
Source§impl Clone for HookDispatchPlan
impl Clone for HookDispatchPlan
Source§impl Debug for HookDispatchPlan
impl Debug for HookDispatchPlan
impl Eq for HookDispatchPlan
Source§impl PartialEq for HookDispatchPlan
impl PartialEq for HookDispatchPlan
impl StructuralPartialEq for HookDispatchPlan
Auto Trait Implementations§
impl Freeze for HookDispatchPlan
impl RefUnwindSafe for HookDispatchPlan
impl Send for HookDispatchPlan
impl Sync for HookDispatchPlan
impl Unpin for HookDispatchPlan
impl UnsafeUnpin for HookDispatchPlan
impl UnwindSafe for HookDispatchPlan
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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