There's no need to honor pager_in_use because it's unused. David Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> --- cache.h | 1 - diff.c | 2 +- environment.c | 1 - pager.c | 2 -- 4 files changed, 1 insertions(+), 5 deletions(-) diff --git a/cache.h b/cache.h index c738299..7a34728 100644 --- a/cache.h +++ b/cache.h @@ -391,7 +391,6 @@ extern int receive_keep_pack(int fd[2], /* pager.c */ extern void setup_pager(void); -extern int pager_in_use; extern int pager_use_color; /* base85 */ diff --git a/diff.c b/diff.c index 6a8c0c9..a7eefa8 100644 --- a/diff.c +++ b/diff.c @@ -175,7 +175,7 @@ int git_diff_ui_config(const char *var, diff_use_color_default = 1; /* bool */ else if (!strcasecmp(value, "auto")) { diff_use_color_default = 0; - if (isatty(1) || (pager_in_use && pager_use_color)) { + if (isatty(1) || pager_use_color) { char *term = getenv("TERM"); if (term && strcmp(term, "dumb")) diff_use_color_default = 1; diff --git a/environment.c b/environment.c index 87162b2..c889816 100644 --- a/environment.c +++ b/environment.c @@ -22,7 +22,6 @@ char git_commit_encoding[MAX_ENCODING_LE int shared_repository = PERM_UMASK; const char *apply_default_whitespace = NULL; int zlib_compression_level = Z_DEFAULT_COMPRESSION; -int pager_in_use; int pager_use_color = 1; static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir, diff --git a/pager.c b/pager.c index dcb398d..40ec566 100644 --- a/pager.c +++ b/pager.c @@ -26,8 +26,6 @@ void setup_pager(void) else if (!*pager || !strcmp(pager, "cat")) return; - pager_in_use = 1; /* means we are emitting to terminal */ - if (pipe(fd) < 0) return; pid = fork(); -- 1.4.2.g460c-dirty - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html