launch_editor(): indicate that Git waits for user input
[gitweb.git] / color.c
diff --git a/color.c b/color.c
index 9ccd954d6ba5cea1dd275cac23bb19966b9c6386..d48dd947c987cdca13f103fd8b4a2e56eceab238 100644 (file)
--- a/color.c
+++ b/color.c
@@ -329,8 +329,7 @@ static int check_auto_color(void)
        if (color_stdout_is_tty < 0)
                color_stdout_is_tty = isatty(1);
        if (color_stdout_is_tty || (pager_in_use() && pager_use_color)) {
-               char *term = getenv("TERM");
-               if (term && strcmp(term, "dumb"))
+               if (!is_terminal_dumb())
                        return 1;
        }
        return 0;
@@ -368,6 +367,14 @@ int git_color_config(const char *var, const char *value, void *cb)
        return 0;
 }
 
+int git_color_default_config(const char *var, const char *value, void *cb)
+{
+       if (git_color_config(var, value, cb) < 0)
+               return -1;
+
+       return git_default_config(var, value, cb);
+}
+
 void color_print_strbuf(FILE *fp, const char *color, const struct strbuf *sb)
 {
        if (*color)