Merge branch 'ml/pager' into next

* ml/pager:
  pager: environment variable GIT_PAGER to override PAGER
  pager: config variable pager.color
  Builtins: control the use of pager from the command table.
  Fix up some fallout from "setup_git_directory()" cleanups
  Fix double "close()" in ce_compare_data
This commit is contained in:
Junio C Hamano
2006-07-31 15:52:08 -07:00
11 changed files with 34 additions and 17 deletions

2
diff.c
View File

@@ -175,7 +175,7 @@ int git_diff_ui_config(const char *var, const char *value)
diff_use_color_default = 1; /* bool */
else if (!strcasecmp(value, "auto")) {
diff_use_color_default = 0;
if (isatty(1) || pager_in_use) {
if (isatty(1) || (pager_in_use && pager_use_color)) {
char *term = getenv("TERM");
if (term && strcmp(term, "dumb"))
diff_use_color_default = 1;