Skip to main content

Module picker_sources

Module picker_sources 

Source
Expand description

:picker magit-branch-pick-base source generator.

Lists existing local branches so magit’s branch-create wizard (c in magit-branch-mode) can let the user pick a base branch before typing the new branch’s name — mirrors Emacs magit’s own two-step “pick base, then type name” flow. Accept emits PickerAcceptOutcome::OpenPrompt, stashing the picked base in the prompt buffer’s synthetic name for action:magit-branch-create-finish (registered in magit_global_mode) to read back.

Structs§

BranchCheckoutSource
MG.29: pick a branch and check it out.
BranchCreateNoCheckoutSource
MG.32: n — magit’s “new branch” without checking it out.
BranchDeleteSource
MG.32: x — delete a branch (magit’s k, moved by evil-collection-magit).
BranchPickBaseSource
BranchPickSource
MG.52: the branch picker, parameterised by the ex-command it hands the picked branch to.
BranchRenameSource
MG.32: m — rename a branch.
CommitPickSource
MG.23j: :picker magit-commit <ex-command> — pick a commit, then run that command on it.
RefPickSource
MG.53.d/e: the tag, remote and ref pickers.
RepoLens
MR.6: which repository a picker is about.
StashPickSource
Pick a stash, then run the named magit ex-command on it.

Enums§

RefScope
What a RefPickSource lists.

Constants§

BRANCH_CHECKOUT_SOURCE
BRANCH_CREATE_NO_CHECKOUT_SOURCE
BRANCH_DELETE_SOURCE
BRANCH_PICK_SOURCE
BRANCH_RENAME_SOURCE
COMMIT_PICK_SOURCE
The source id, shared by the generator and every Effect::OpenPicker that names it — the drift BranchPickBaseSource’s own test exists to catch, avoided here by there being one constant.
REF_PICK_SOURCE
REMOTE_PICK_SOURCE
REVISION_PICK_SOURCE
STASH_PICK_SOURCE
TAG_PICK_SOURCE

Functions§

register
Register this crate’s picker sources into the supplied registry. Called from lattice-host’s editor_boot.rs, mirroring lattice_snippet::picker_sources::register — the picker registry is host-owned and populated by name at boot (no generic SubsystemBoot seam for pickers today), so this is the established shape for a feature crate to contribute a source. MG.54: config reaches the revision source so it can read magit.revision-preview at preview time. Passed in rather than looked up because the picker registry is populated at boot, before any service registry the source could consult exists — and because the option is this crate’s, so this crate reads it (the host learns nothing about magit’s options).