Function get_editor

Source
pub fn get_editor(
    git_run_info: &GitRunInfo,
    repo: &Repo,
) -> Result<Option<OsString>>
Expand description

Get the configured editor, if any.

Because this is primarily intended for use w/ dialoguer::Editor, and it already considers several environment variables, we only need to consider git-specific config options: the $GIT_EDITOR environment var and the core.editor config setting. We do so in that order to match how git resolves the editor to use.

FMI see https://git-scm.com/docs/git-var#Documentation/git-var.txt-GITEDITOR