pub struct DispatchGates {
pub bisect: bool,
pub notes_merge: bool,
pub am: bool,
pub rebase: bool,
pub cherry_pick: bool,
pub revert: bool,
pub merge: bool,
pub workdir: PathBuf,
}Expand description
The mid-flight git operations the menu gates rows on.
A struct rather than positional bools: they are adjacent, same
type, and both mean “something is half-done” — exactly the pair that
transposes silently, and a transposed gate shows the wrong menu with
no error.
Fields§
§bisect: boolMG.21g: git bisect is running.
notes_merge: boolMG.37: git notes merge stopped on a conflict.
am: boolMG.39: git am stopped on a patch that would not apply.
rebase: boolMG.41e: a rebase is stopped — mid-conflict or at an edit stop.
cherry_pick: boolMG.42-E4: a cherry-pick sequence stopped on a conflict.
revert: boolMG.42-E4: a revert sequence stopped on a conflict.
merge: boolA merge stopped on a conflict. MERGE_HEAD was checked nowhere
before this, so the merge menu offered only ways IN while git
refused every one of them.
workdir: PathBufMR.6: the repository these gates describe.
Carried rather than threaded separately because a menu’s rows ask
two kinds of question about one repository — “is a rebase
stopped” and “what is pull.rebase set to” — and answering them
about different repositories is the bug this whole series is
about. One value, probed once, for both.
Implementations§
Source§impl DispatchGates
impl DispatchGates
Sourcepub fn probe_in(workdir: &Path) -> Self
pub fn probe_in(workdir: &Path) -> Self
Read the gates from the repository.
Every guard over this menu passes gates in rather than calling
this, deliberately: probing would make a test’s row count depend
on whether the developer’s own checkout happened to be mid-bisect
while the suite ran — a flake that reads as a real regression.
MR.4: probed in workdir, which is the repository of the buffer
the menu was opened over — not the process’s.
This is what the rows are about: offering rebase --continue
because some other checkout is mid-rebase is a row that does
nothing here, and hiding it while THIS repository is stopped is
worse — the way out of a stopped rebase is missing from the menu
whose job is to show it.
Trait Implementations§
Source§impl Clone for DispatchGates
impl Clone for DispatchGates
Source§fn clone(&self) -> DispatchGates
fn clone(&self) -> DispatchGates
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DispatchGates
impl Debug for DispatchGates
Source§impl Default for DispatchGates
impl Default for DispatchGates
Source§fn default() -> DispatchGates
fn default() -> DispatchGates
impl Eq for DispatchGates
Source§impl PartialEq for DispatchGates
impl PartialEq for DispatchGates
impl StructuralPartialEq for DispatchGates
Auto Trait Implementations§
impl Freeze for DispatchGates
impl RefUnwindSafe for DispatchGates
impl Send for DispatchGates
impl Sync for DispatchGates
impl Unpin for DispatchGates
impl UnsafeUnpin for DispatchGates
impl UnwindSafe for DispatchGates
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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