pub struct RemoteOp {
pub what: &'static str,
pub doing: &'static str,
pub args: &'static [&'static str],
pub flags: &'static [RemoteFlag],
}Fields§
§what: &'static strNC.4: what this does, as an imperative phrase a user reads
(“continue rebase”, not “rebase –continue”). The notification
label is built from it — see Self::label — and must read
correctly before “failed” as well as before a summary.
doing: &'static strThe same, in progress, for the fire-time echo (“continuing
rebase…”). Spelled out rather than derived: appending “ing” to
what produced “stage alling” and “cherry-pick –continueing”.
args: &'static [&'static str]Base argv passed to git, before flags.
flags: &'static [RemoteFlag]Toggleable flags, in args_schema order.
Implementations§
Source§impl RemoteOp
impl RemoteOp
pub const PULL: Self
pub const PUSH: Self
pub const FETCH: Self
Sourcepub const CHERRY_PICK_CONTINUE: Self
pub const CHERRY_PICK_CONTINUE: Self
MG.34: the way out of a rebase that stopped.
magit-edit-line-commit marks a commit edit, which is only
useful if the rebase can be resumed afterwards — and until this
slice the ONLY sequencer control was C-c C-k inside a todo
buffer, so a stopped rebase left the repository in a state the
editor could not finish. Shipping the edit row without these
would have been shipping a trap.
GIT_EDITOR is forced to true by [run_remote_op] for the
same reason run_rebase does it: --continue opens the commit
message in $EDITOR, and an editor we cannot drive would hang
the task forever.
pub const CHERRY_PICK_SKIP: Self
pub const CHERRY_PICK_ABORT: Self
pub const REVERT_CONTINUE: Self
pub const REVERT_SKIP: Self
pub const REVERT_ABORT: Self
Sourcepub const MERGE_CONTINUE: Self
pub const MERGE_CONTINUE: Self
Conclude a merge stopped on a conflict. Equivalent to committing the prepared merge message once the index is clean; git refuses it while unmerged paths remain, which is the right answer and is reported rather than swallowed.
Sourcepub const MERGE_ABORT: Self
pub const MERGE_ABORT: Self
Throw the merge away and restore the branch.
pub const REBASE_CONTINUE: Self
pub const REBASE_SKIP: Self
Sourcepub const REBASE_ABORT: Self
pub const REBASE_ABORT: Self
The abort C-c C-k runs, reachable when there is no todo buffer
open — which is the case once the rebase has actually started.
Sourcepub const NOTES_PRUNE: Self
pub const NOTES_PRUNE: Self
MG.37: the notes operations with no argument. spawn_remote_op’s
shape — one bounded argv, off-thread, notify — fits them for the
same reason it fits the rebase sequencer.
pub const NOTES_MERGE_COMMIT: Self
pub const NOTES_MERGE_ABORT: Self
Sourcepub const AM_CONTINUE: Self
pub const AM_CONTINUE: Self
MG.39: the way out of a git am that stopped.
am stops on a patch that does not apply, exactly as rebase
stops on edit — and for the same reason as MG.34’s sequencer
commands, shipping the apply without these would leave the
repository in a state the editor cannot finish.
pub const AM_SKIP: Self
pub const AM_ABORT: Self
Sourcepub const STAGE_ALL: Self
pub const STAGE_ALL: Self
MG.23b: magit’s S — stage every tracked modification at once.
add --update, matching magit-stage-modified: tracked changes
only. Untracked files are deliberately NOT swept in — “stage
everything” quietly adding a file you never told git about is
how build artefacts and secrets get committed. Magit reaches
that behaviour behind a prefix argument, which is exactly the
deferred <C-u> work; until then s on the Untracked entry in
magit-status is the explicit path.
Sourcepub const UNSTAGE_ALL: Self
pub const UNSTAGE_ALL: Self
MG.23b: magit’s U — unstage everything.
A bare git reset: the index goes back to HEAD and the working
tree is untouched, so nothing is lost and every change is still
there to re-stage. That is why it does not ask, per §12.13’s
no-confirm set for index-only work — the blast radius is wider
than one file but it is still fully reversible.
Sourcepub const STASH_KEEP_INDEX: Self
pub const STASH_KEEP_INDEX: Self
MG.41d: magit’s x — stash everything but leave the index
staged, so a partially-staged commit can be tried in isolation.
Sourcepub const STASH_STAGED: Self
pub const STASH_STAGED: Self
MG.41d: magit’s i — stash only what is staged.
pub const STASH: Self
Sourcepub fn argv(&self, args: &Args) -> Vec<String>
pub fn argv(&self, args: &Args) -> Vec<String>
Resolve the full argv for this run: the base plus every flag the
caller enabled. args is positional by flags order — see
RemoteOp::flags.
Sourcepub fn label(&self, argv: &[String]) -> String
pub fn label(&self, argv: &[String]) -> String
NC.4: the notification label for one run, naming what the resolved argv acts on.
Built from the argv rather than the transient state, so it describes what actually ran — including a destination resolved at run time. A force-push, a dry run and a push of tags each read differently from a plain push; before this they all read “push”.
Trait Implementations§
impl Copy for RemoteOp
impl Eq for RemoteOp
impl StructuralPartialEq for RemoteOp
Auto Trait Implementations§
impl Freeze for RemoteOp
impl RefUnwindSafe for RemoteOp
impl Send for RemoteOp
impl Sync for RemoteOp
impl Unpin for RemoteOp
impl UnsafeUnpin for RemoteOp
impl UnwindSafe for RemoteOp
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