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§
- Branch
Checkout Source - MG.29: pick a branch and check it out.
- Branch
Create NoCheckout Source - MG.32:
n— magit’s “new branch” without checking it out. - Branch
Delete Source - MG.32:
x— delete a branch (magit’sk, moved by evil-collection-magit). - Branch
Pick Base Source - Branch
Pick Source - MG.52: the branch picker, parameterised by the ex-command it hands the picked branch to.
- Branch
Rename Source - MG.32:
m— rename a branch. - Commit
Pick Source - MG.23j:
:picker magit-commit <ex-command>— pick a commit, then run that command on it. - RefPick
Source - MG.53.d/e: the tag, remote and ref pickers.
- Repo
Lens - MR.6: which repository a picker is about.
- Stash
Pick Source - Pick a stash, then run the named magit ex-command on it.
Enums§
- RefScope
- What a
RefPickSourcelists.
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::OpenPickerthat names it — the driftBranchPickBaseSource’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’seditor_boot.rs, mirroringlattice_snippet::picker_sources::register— the picker registry is host-owned and populated by name at boot (no genericSubsystemBootseam for pickers today), so this is the established shape for a feature crate to contribute a source. MG.54:configreaches the revision source so it can readmagit.revision-previewat 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).