{"thread":{"id":"5290","subject":"[PATCH] remove unused pager_in_use","startedAt":"2006-08-15T20:49:07Z","lastAt":"2006-08-16T00:09:03Z","messageCount":2,"participants":["David Rientjes","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25381","messageId":"Pine.LNX.4.63.0608151348310.2687@chino.corp.google.com","threadId":"5290","inReplyTo":null,"subject":"[PATCH] remove unused pager_in_use","fromName":"David Rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-15T20:49:07Z","receivedAt":"2006-08-15T20:49:07Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"There's no need to honor pager_in_use because it's unused.\n\n\t\tDavid\n\nSigned-off-by: David Rientjes <rientjes@google.com>\n---\n cache.h       |    1 -\n diff.c        |    2 +-\n environment.c |    1 -\n pager.c       |    2 --\n 4 files changed, 1 insertions(+), 5 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex c738299..7a34728 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -391,7 +391,6 @@ extern int receive_keep_pack(int fd[2], \n \n /* pager.c */\n extern void setup_pager(void);\n-extern int pager_in_use;\n extern int pager_use_color;\n \n /* base85 */\ndiff --git a/diff.c b/diff.c\nindex 6a8c0c9..a7eefa8 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -175,7 +175,7 @@ int git_diff_ui_config(const char *var, \n \t\t\tdiff_use_color_default = 1; /* bool */\n \t\telse if (!strcasecmp(value, \"auto\")) {\n \t\t\tdiff_use_color_default = 0;\n-\t\t\tif (isatty(1) || (pager_in_use && pager_use_color)) {\n+\t\t\tif (isatty(1) || pager_use_color) {\n \t\t\t\tchar *term = getenv(\"TERM\");\n \t\t\t\tif (term && strcmp(term, \"dumb\"))\n \t\t\t\t\tdiff_use_color_default = 1;\ndiff --git a/environment.c b/environment.c\nindex 87162b2..c889816 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -22,7 +22,6 @@ char git_commit_encoding[MAX_ENCODING_LE\n int shared_repository = PERM_UMASK;\n const char *apply_default_whitespace = NULL;\n int zlib_compression_level = Z_DEFAULT_COMPRESSION;\n-int pager_in_use;\n int pager_use_color = 1;\n \n static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir,\ndiff --git a/pager.c b/pager.c\nindex dcb398d..40ec566 100644\n--- a/pager.c\n+++ b/pager.c\n@@ -26,8 +26,6 @@ void setup_pager(void)\n \telse if (!*pager || !strcmp(pager, \"cat\"))\n \t\treturn;\n \n-\tpager_in_use = 1; /* means we are emitting to terminal */\n-\n \tif (pipe(fd) < 0)\n \t\treturn;\n \tpid = fork();\n-- \n1.4.2.g460c-dirty\n"},{"id":"25392","messageId":"Pine.LNX.4.63.0608160206510.28360@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5290","inReplyTo":"Pine.LNX.4.63.0608151348310.2687@chino.corp.google.com","subject":"Re: [PATCH] remove unused pager_in_use","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-08-16T00:09:03Z","receivedAt":"2006-08-16T00:09:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Aug 2006, David Rientjes wrote:\n\n> There's no need to honor pager_in_use because it's unused.\n>\n> [...]\n>\n> -\t\t\tif (isatty(1) || (pager_in_use && pager_use_color)) {\n> +\t\t\tif (isatty(1) || pager_use_color) {\n\nWell, it _was_ in use, before you removed it.\n\nCiao,\nDscho\n"}]}