pub struct CommitHookEnv<'a> {
pub index_file: Option<&'a Path>,
pub git_editor: Option<&'a str>,
pub git_prefix: Option<&'a str>,
pub extra_env: &'a [(&'a str, &'a str)],
}Expand description
Environment for commit-style hooks (GIT_INDEX_FILE, GIT_EDITOR, GIT_PREFIX, and extra pairs).
Fields§
§index_file: Option<&'a Path>Absolute or cwd-relative index path passed as GIT_INDEX_FILE.
git_editor: Option<&'a str>When set, overrides GIT_EDITOR for the hook subprocess (e.g. ":" when no editor is used).
git_prefix: Option<&'a str>When set, used as GIT_PREFIX; when unset, derived from the current directory and work tree.
extra_env: &'a [(&'a str, &'a str)]Additional KEY=value pairs for the hook subprocess.
Trait Implementations§
Source§impl<'a> Clone for CommitHookEnv<'a>
impl<'a> Clone for CommitHookEnv<'a>
Source§fn clone(&self) -> CommitHookEnv<'a>
fn clone(&self) -> CommitHookEnv<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CommitHookEnv<'a>
impl<'a> Debug for CommitHookEnv<'a>
Source§impl<'a> Default for CommitHookEnv<'a>
impl<'a> Default for CommitHookEnv<'a>
Source§fn default() -> CommitHookEnv<'a>
fn default() -> CommitHookEnv<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for CommitHookEnv<'a>
impl<'a> RefUnwindSafe for CommitHookEnv<'a>
impl<'a> Send for CommitHookEnv<'a>
impl<'a> Sync for CommitHookEnv<'a>
impl<'a> Unpin for CommitHookEnv<'a>
impl<'a> UnsafeUnpin for CommitHookEnv<'a>
impl<'a> UnwindSafe for CommitHookEnv<'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