Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/editor.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / editor.h` 35 lines ยท 1194 bytes Raw Blame History 1 #ifndef EDITOR_H 2 #define EDITOR_H 3 4 struct repository; 5 struct strbuf; 6 7 const char *git_editor(void); 8 const char *git_sequence_editor(void); 9 int is_terminal_dumb(void); 10 11 /** 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. 17 */ 18 int launch_editor(const char *path, struct strbuf *buffer, 19 const char *const *env); 20 21 int launch_sequence_editor(const char *path, struct strbuf *buffer, 22 const char *const *env); 23 24 /* 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. 29 * 30 * If `path` is relative, it refers to a file in the `.git` directory. 31 */ 32 int strbuf_edit_interactively(struct repository *r, struct strbuf *buffer, 33 const char *path, const char *const *env); 34 35 #endif