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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux