pager: make pager_program a file-local static

This variable is only ever used by the routines in pager.c, and other parts of the code should always use those routines (like git_pager()) to make decisions about which pager to use. Let's reduce its scope to prevent accidents. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Sep 12, 2016 at 20:23 UTC c0c08897c47eb46179c8d2408dc1a91713307842
3 files changed +1 -2
cache.h
-1
@@ -1733,7 +1733,6 @@ extern int write_file_gently(const char *path, const char *fmt, ...);
1733
1734 /* pager.c */
1735 extern void setup_pager(void);
1736 -extern const char *pager_program;
1736 extern int pager_in_use(void);
1737 extern int pager_use_color;
1738 extern int term_columns(void);
environment.c
-1
@@ -39,7 +39,6 @@ size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
39 size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
40 size_t delta_base_cache_limit = 96 * 1024 * 1024;
41 unsigned long big_file_threshold = 512 * 1024 * 1024;
42 -const char *pager_program;
42 int pager_use_color = 1;
43 const char *editor_program;
44 const char *askpass_program;
pager.c
+1
@@ -7,6 +7,7 @@
7 #endif
8
9 static struct child_process pager_process = CHILD_PROCESS_INIT;
10 +static const char *pager_program;
11
12 static void wait_for_pager(int in_signal)
13 {