| 25 | } |
| 26 | |
| 27 | const char *git_editor(void) |
| 28 | { |
| 29 | const char *editor = getenv("GIT_EDITOR"); |
| 30 | int terminal_is_dumb = is_terminal_dumb(); |
| 31 | |
| 32 | if (!editor && editor_program) |
| 33 | editor = editor_program; |
| 34 | if (!editor && !terminal_is_dumb) |
| 35 | editor = getenv("VISUAL"); |
| 36 | if (!editor) |
| 37 | editor = getenv("EDITOR"); |
| 38 | |
| 39 | if (!editor && terminal_is_dumb) |
| 40 | return NULL; |
| 41 | |
| 42 | if (!editor) |
| 43 | editor = DEFAULT_EDITOR; |
| 44 | |
| 45 | return editor; |
| 46 | } |
| 47 | |
| 48 | const char *git_sequence_editor(void) |
| 49 | { |
no test coverage detected