summaryrefslogtreecommitdiff
path: root/editor.c
diff options
context:
space:
mode:
authorLibravatar Ben Boeckel <mathstuf@gmail.com>2021-08-23 12:44:00 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-08-25 12:07:52 -0700
commited9bff0817d5a7500b50a39c1c35b44aa3e72578 (patch)
tree2fbf27448d1085ad518e03a6c2a6c7902d271a28 /editor.c
parentadvice: add enum variants for missing advice variables (diff)
downloadtgif-ed9bff0817d5a7500b50a39c1c35b44aa3e72578.tar.xz
advice: remove read uses of most global `advice_` variables
In c4a09cc9ccb (Merge branch 'hw/advise-ng', 2020-03-25), a new API for accessing advice variables was introduced and deprecated `advice_config` in favor of a new array, `advice_setting`. This patch ports all but two uses which read the status of the global `advice_` variables over to the new `advice_enabled` API. We'll deal with advice_add_embedded_repo and advice_graft_file_deprecated separately. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor.c b/editor.c
index 6303ae0ab0..fdd3eeafa9 100644
--- a/editor.c
+++ b/editor.c
@@ -58,7 +58,7 @@ static int launch_specified_editor(const char *editor, const char *path,
const char *args[] = { editor, NULL, NULL };
struct child_process p = CHILD_PROCESS_INIT;
int ret, sig;
- int print_waiting_for_editor = advice_waiting_for_editor && isatty(2);
+ int print_waiting_for_editor = advice_enabled(ADVICE_WAITING_FOR_EDITOR) && isatty(2);
if (print_waiting_for_editor) {
/*