Skip to main content

view_arguments_transient

Function view_arguments_transient 

Source
pub fn view_arguments_transient(
    ids: &MagitActionIds,
    ctx: &TransientContext,
) -> TransientSpec
Expand description

MG.21g: the B bisect submenu, gated on whether a bisect is running.

Why the menu is gated rather than showing everything. good / bad / skip / reset outside a bisect are not merely useless — git errors on them, so they would be rows that look actionable and produce a log line. start during a bisect is the same in reverse. Magit gates this menu for exactly these reasons, and the no-inert-rows policy says the same thing from our side.

The gate is a stat, not a git call. This spec is built when C-c g is pressed — on the actor thread — so answering “is a bisect running” by spawning git would be process-spawn latency on a keystroke path (paramount goal #1). Bisect::in_progress reads .git/BISECT_LOG, which is the file git itself creates and removes. Discovering the repository is the same magit_workdir lookup every magit chord already does. MG.23k: D — the arguments the view you are in can be re-run with.

One menu, whose content is chosen by the major mode, because one chord serves what magit splits across D (diff) and L (log) — L is the bottom-of-screen motion here and stays off chords. See MagitView::argument_flags.

A buffer with no arguments gets a menu that says so rather than an empty one: the chord is bound on magit-core-mode, so it fires in every magit buffer, and silence would read as a broken key.