Web lists-archives.com

Re: [GSoC][PATCH v3 03/13] editor: add a function to launch the sequence editor




For those reading from sidelines, this is unchanged from the
previous round, and looking good.

Alban Gruin <alban.gruin@xxxxxxxxx> 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.