7 const char *git_editor(void);
8 const char *git_sequence_editor(void);
9 int is_terminal_dumb(void);
12 * Launch the user preferred editor to edit a file and fill the buffer
13 * with the file's contents upon the user completing their editing. The
14 * third argument can be used to set the environment which the editor is
15 * run in. If the buffer is NULL the editor is launched as usual but the
16 * file's contents are not read into the buffer upon completion.
18 int launch_editor(const char *path
, struct strbuf
*buffer
,
19 const char *const *env
);
21 int launch_sequence_editor(const char *path
, struct strbuf
*buffer
,
22 const char *const *env
);
25 * In contrast to `launch_editor()`, this function writes out the contents
26 * of the specified file first, then clears the `buffer`, then launches
27 * the editor and reads back in the file contents into the `buffer`.
28 * Finally, it deletes the temporary file.
30 * If `path` is relative, it refers to a file in the `.git` directory.
32 int strbuf_edit_interactively(struct repository
*r
, struct strbuf
*buffer
,
33 const char *path
, const char *const *env
);