pub struct CommitRegion {Show 13 fields
pub all: bool,
pub only: Option<bool>,
pub include: bool,
pub interactive: bool,
pub patch: bool,
pub dry_run: bool,
pub amend: bool,
pub allow_empty: bool,
pub fixup: Option<FixupKind>,
pub pathspec_from_file: Option<OptionValue>,
pub pathspec_file_nul: bool,
pub pathspecs: Vec<usize>,
pub wrapper: WrapperFlags,
}Expand description
What:
Final-state facts of one git commit region.
Vec<usize> is an owned list of
token indexes;
Option<bool> is “true,
false,
or never stated”.
Why:
Indexes point into the caller’s unchanged arguments,
so paths keep their bytes.
In TS you’d write (pseudocode):
type CommitRegion = { all: boolean; only?: boolean; include: boolean; /* ... */ pathspecs: number[] };Fields§
§all: bool-a/--all is on.
only: Option<bool>Some(true) after -o/--only,
Some(false) after --no-only,
None if unstated.
include: bool-i/--include is on.
interactive: bool--interactive is on.
patch: bool-p/--patch is on.
dry_run: bool--dry-run,
a status format,
or -z makes Git record no commit (commit.c:1422-1423).
amend: bool--amend is on.
allow_empty: bool--allow-empty is on.
fixup: Option<FixupKind>Form of the final --fixup value,
when one is set.
pathspec_from_file: Option<OptionValue>Position of the final --pathspec-from-file value,
when one is set.
pathspec_file_nul: bool--pathspec-file-nul is on.
pathspecs: Vec<usize>Region token indexes of positional pathspecs,
before and after --.
wrapper: WrapperFlagsWrapper-only flags in option position;
escape is --no-enforce-only.
Trait Implementations§
Source§impl Clone for CommitRegion
impl Clone for CommitRegion
Source§impl Debug for CommitRegion
impl Debug for CommitRegion
impl Eq for CommitRegion
Source§impl PartialEq for CommitRegion
impl PartialEq for CommitRegion
impl StructuralPartialEq for CommitRegion
Auto Trait Implementations§
impl Freeze for CommitRegion
impl RefUnwindSafe for CommitRegion
impl Send for CommitRegion
impl Sync for CommitRegion
impl Unpin for CommitRegion
impl UnsafeUnpin for CommitRegion
impl UnwindSafe for CommitRegion
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