From: Junio C Hamano Date: Tue, 10 Jul 2018 17:58:23 GMT Subject: Re: [GSoC][PATCH v3 03/13] editor: add a function to launch the sequence editor Message-ID: In-Reply-To: <20180710121557.6698-4-alban.gruin@gmail.com> For those reading from sidelines, this is unchanged from the previous round, and looking good. Alban Gruin writes: > +const char *git_sequence_editor(void) > { > - const char *editor = git_editor(); > + const char *editor = getenv("GIT_SEQUENCE_EDITOR"); > + > + if (!editor) > + git_config_get_string_const("sequence.editor", &editor); > + if (!editor) > + editor = git_editor(); > > + return editor; > +} > + > +static int launch_specified_editor(const char *editor, const char *path, > + struct strbuf *buffer, const char *const *env) > +{ > if (!editor) > return error("Terminal is dumb, but EDITOR unset"); Nice code reuse.