mirror of
https://github.com/git/git.git
synced 2026-03-14 02:43:25 +01:00
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:
2
diff.c
2
diff.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user