pub struct RunHookOptions<'a> {
pub stdio: HookStdio,
pub stdout_to_stderr: bool,
pub path_to_stdin: Option<&'a Path>,
pub stdin_data: Option<&'a [u8]>,
pub env_vars: &'a [(&'a str, &'a str)],
pub cwd: Option<&'a Path>,
pub commit_env: Option<&'a CommitHookEnv<'a>>,
}Expand description
Options for run_hook_opts.
Fields§
§stdio: HookStdioCapture hook output or let hooks write to this process’s stderr (see HookStdio).
The run_* helpers that take a Repository use Repository::hook_stdio.
stdout_to_stderr: boolUnder HookStdio::Inherit, send hook stdout to this process’s stderr (Git does this
for every hook except pre-push). Captured stdout is always returned separately.
path_to_stdin: Option<&'a Path>File path to open and pipe to each hook’s stdin (reopened per hook).
stdin_data: Option<&'a [u8]>In-memory stdin (used when path_to_stdin is None).
env_vars: &'a [(&'a str, &'a str)]Extra environment variables for each hook subprocess.
cwd: Option<&'a Path>Override the hook process working directory.
commit_env: Option<&'a CommitHookEnv<'a>>Commit-style env (GIT_INDEX_FILE, GIT_PREFIX, author exports, …) merged after env_vars.
Trait Implementations§
Source§impl<'a> Clone for RunHookOptions<'a>
impl<'a> Clone for RunHookOptions<'a>
Source§impl<'a> Debug for RunHookOptions<'a>
impl<'a> Debug for RunHookOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for RunHookOptions<'a>
impl<'a> RefUnwindSafe for RunHookOptions<'a>
impl<'a> Send for RunHookOptions<'a>
impl<'a> Sync for RunHookOptions<'a>
impl<'a> Unpin for RunHookOptions<'a>
impl<'a> UnsafeUnpin for RunHookOptions<'a>
impl<'a> UnwindSafe for RunHookOptions<'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