summaryrefslogtreecommitdiff
path: root/sideband.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-19 19:33:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-19 19:33:59 (GMT)
commit0c69a132cb1adf0ce9f31e6631f89321e437cb76 (patch)
tree96b88504e01e80a17c98d85d4f56e2025ddd548a /sideband.c
parentbdae4af87053490adad2dc9fb184d6d050d46a4c (diff)
parentabfb04d0c74cde804c734015ff5868a88c84fb6f (diff)
downloadgit-0c69a132cb1adf0ce9f31e6631f89321e437cb76.zip
git-0c69a132cb1adf0ce9f31e6631f89321e437cb76.tar.gz
git-0c69a132cb1adf0ce9f31e6631f89321e437cb76.tar.bz2
Merge branch 'ls/editor-waiting-message'
Git shows a message to tell the user that it is waiting for the user to finish editing when spawning an editor, in case the editor opens to a hidden window or somewhere obscure and the user gets lost. * ls/editor-waiting-message: launch_editor(): indicate that Git waits for user input refactor "dumb" terminal determination
Diffstat (limited to 'sideband.c')
-rw-r--r--sideband.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sideband.c b/sideband.c
index 1e4d684..6d7f943 100644
--- a/sideband.c
+++ b/sideband.c
@@ -20,13 +20,12 @@
int recv_sideband(const char *me, int in_stream, int out)
{
- const char *term, *suffix;
+ const char *suffix;
char buf[LARGE_PACKET_MAX + 1];
struct strbuf outbuf = STRBUF_INIT;
int retval = 0;
- term = getenv("TERM");
- if (isatty(2) && term && strcmp(term, "dumb"))
+ if (isatty(2) && !is_terminal_dumb())
suffix = ANSI_SUFFIX;
else
suffix = DUMB_SUFFIX;