Thread (1 message) 1 message, 1 author, 2018-07-10

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

From: Junio C Hamano <hidden>
Date: 2018-07-10 18:19:34

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

Alban Gruin [off-list ref] 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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help