git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] remove unused pager_in_use

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 15, 2006, 20:49 UTC
Message-ID
<Pine.LNX.4.63.0608151348310.2687@chino.corp.google.com>
There's no need to honor pager_in_use because it's unused.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 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
Next: Johannes Schindelin
Message 1 of 2 in “remove unused pager_in_use”
  1. remove unused pager_in_useDavid Rientjes, Aug 15, 2006
  2. Johannes SchindelinAug 16, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.