]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pager.h: move declarations for pager.c functions from cache.h
authorElijah Newren <newren@gmail.com>
Tue, 11 Apr 2023 07:41:59 +0000 (00:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Apr 2023 15:52:10 +0000 (08:52 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 files changed:
builtin/am.c
builtin/blame.c
builtin/fetch.c
builtin/grep.c
builtin/help.c
builtin/log.c
builtin/name-rev.c
builtin/var.c
cache.h
color.c
column.c
config.c
date.c
diff.c
editor.c
environment.c
git.c
pager.c
pager.h [new file with mode: 0644]
pretty.c
progress.c
range-diff.c
sequencer.c

index f7a065e52909778f73c93bd7b64eb733b663adb0..5c83f2e003fb01ab6409a23e3a79ab15e4aed6f2 100644 (file)
@@ -40,6 +40,7 @@
 #include "apply.h"
 #include "string-list.h"
 #include "packfile.h"
+#include "pager.h"
 #include "repository.h"
 #include "pretty.h"
 #include "wrapper.h"
index a628388c2ce94915780c7ab44893e6b0323d5994..2df6039a6e0e139227c937023b8d8565e5ceb611 100644 (file)
@@ -30,6 +30,7 @@
 #include "progress.h"
 #include "object-name.h"
 #include "object-store.h"
+#include "pager.h"
 #include "blame.h"
 #include "refs.h"
 #include "setup.h"
index 8a8ab6799e88a5febafed69b1216731e56a7248e..61e8ac113b1f2f65b3d75e365f094477cd654e17 100644 (file)
@@ -28,6 +28,7 @@
 #include "strvec.h"
 #include "utf8.h"
 #include "packfile.h"
+#include "pager.h"
 #include "list-objects-filter-options.h"
 #include "commit-reach.h"
 #include "branch.h"
index fb11be6075ab85ab5348a49b106be3dbfab8f2b2..b86c754defbc59654a6e455b2115487ba01f084f 100644 (file)
@@ -30,6 +30,7 @@
 #include "object-name.h"
 #include "object-store.h"
 #include "packfile.h"
+#include "pager.h"
 #include "write-or-die.h"
 
 static const char *grep_prefix;
index 87333a02ec40adb4e2b2b613b840c36f066f4e52..128aa83099a8a9cb8d1b31b9823464d3b12cb5ec 100644 (file)
@@ -6,6 +6,7 @@
 #include "builtin.h"
 #include "exec-cmd.h"
 #include "gettext.h"
+#include "pager.h"
 #include "parse-options.h"
 #include "run-command.h"
 #include "config-list.h"
index b6246c7042c09f01018e64753cd8150a7ce8c325..95de51921f8c8e1a5df89049c47089878b8abb1a 100644 (file)
@@ -15,6 +15,7 @@
 #include "object-file.h"
 #include "object-name.h"
 #include "object-store.h"
+#include "pager.h"
 #include "color.h"
 #include "commit.h"
 #include "diff.h"
index 41fd56b9ba969f0b6259e0fb110c6948ce396a8f..593f0506a105c50d934f0ca405bed2006b0bffe5 100644 (file)
@@ -9,6 +9,7 @@
 #include "tag.h"
 #include "refs.h"
 #include "object-name.h"
+#include "pager.h"
 #include "parse-options.h"
 #include "prio-queue.h"
 #include "hash-lookup.h"
index 90616cf65a24f3f8176ee76ef1e2ffd1e59f6f1f..aa8150fa92eca01dea5ddaadb8bfa0d7ba3a0f6c 100644 (file)
@@ -7,6 +7,7 @@
 #include "config.h"
 #include "editor.h"
 #include "ident.h"
+#include "pager.h"
 #include "refs.h"
 
 static const char var_usage[] = "git var (-l | <variable>)";
diff --git a/cache.h b/cache.h
index 97ddf4094a371f1cca9c55c46b059ff11c67b6d5..21fd520b0453e244941bc22fac87c9b52c74026f 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -145,7 +145,6 @@ struct cache_entry {
 
 /* Forward structure decls */
 struct pathspec;
-struct child_process;
 struct tree;
 
 /*
@@ -621,8 +620,6 @@ int df_name_compare(const char *name1, size_t len1, int mode1,
 int name_compare(const char *name1, size_t len1, const char *name2, size_t len2);
 int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
 
-const char *git_pager(int stdout_is_tty);
-
 struct cache_def {
        struct strbuf path;
        int flags;
@@ -671,16 +668,6 @@ int copy_fd(int ifd, int ofd);
 int copy_file(const char *dst, const char *src, int mode);
 int copy_file_with_time(const char *dst, const char *src, int mode);
 
-/* pager.c */
-void setup_pager(void);
-int pager_in_use(void);
-extern int pager_use_color;
-int term_columns(void);
-void term_clear_line(void);
-int decimal_width(uintmax_t);
-int check_pager_config(const char *cmd);
-void prepare_pager_args(struct child_process *, const char *pager);
-
 /* base85 */
 int decode_85(char *dst, const char *line, int linelen);
 void encode_85(char *buf, const unsigned char *data, int bytes);
diff --git a/color.c b/color.c
index a8e8d5202ab3a0eb640138c34148b1882f2cc073..6031998d3ea0bc729b048b908fd5344d2e764329 100644 (file)
--- a/color.c
+++ b/color.c
@@ -4,6 +4,7 @@
 #include "editor.h"
 #include "gettext.h"
 #include "hex.h"
+#include "pager.h"
 
 static int git_use_color_default = GIT_COLOR_AUTO;
 int color_stdout_is_tty = -1;
index fbf88639aaed931602b203f012468cdeefda284f..c89c90328a675d26508c004af2e2559c58a9f63d 100644 (file)
--- a/column.c
+++ b/column.c
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "column.h"
 #include "string-list.h"
+#include "pager.h"
 #include "parse-options.h"
 #include "run-command.h"
 #include "utf8.h"
index aac439530e94c4761f125dae091ce83945ca5ab7..11e3295419b752ca579967377bbb2a018aa4302f 100644 (file)
--- a/config.c
+++ b/config.c
@@ -25,6 +25,7 @@
 #include "string-list.h"
 #include "object-name.h"
 #include "object-store.h"
+#include "pager.h"
 #include "utf8.h"
 #include "dir.h"
 #include "color.h"
diff --git a/date.c b/date.c
index 1fb2cd1b53854a818124baf46ba952cf134ea209..e944c8905af68d572026730fb02388158df955ff 100644 (file)
--- a/date.c
+++ b/date.c
@@ -7,6 +7,7 @@
 #include "cache.h"
 #include "date.h"
 #include "gettext.h"
+#include "pager.h"
 
 /*
  * This is like mktime, but without normalization of tm_wday and tm_yday.
diff --git a/diff.c b/diff.c
index f8e0d3b5c592ff66cb6573ab3a155a5635aebc1a..fa86d023196b8a95f9f413f96b7bd2586b47add9 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -31,6 +31,7 @@
 #include "graph.h"
 #include "oid-array.h"
 #include "packfile.h"
+#include "pager.h"
 #include "parse-options.h"
 #include "help.h"
 #include "promisor-remote.h"
index 12025dfec37e8c573522990d996c248c4a2f1b21..7c796385493b7823de9d7ffa1e740c4c85b412a6 100644 (file)
--- a/editor.c
+++ b/editor.c
@@ -5,6 +5,7 @@
 #include "editor.h"
 #include "environment.h"
 #include "gettext.h"
+#include "pager.h"
 #include "strbuf.h"
 #include "strvec.h"
 #include "run-command.h"
index 39efa49fe313a53ca7ca59173a7748fe913aca3c..8a96997539ab4edd2216aa3be1747aa947297300 100644 (file)
@@ -59,7 +59,6 @@ size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
 size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
 size_t delta_base_cache_limit = 96 * 1024 * 1024;
 unsigned long big_file_threshold = 512 * 1024 * 1024;
-int pager_use_color = 1;
 const char *editor_program;
 const char *askpass_program;
 const char *excludes_file;
diff --git a/git.c b/git.c
index d2bb86e0d3260f6ee7f75f9b3677ea19a82cfd45..0241d2cf9137bba7ed50cbeb5da2d4e28aa4845f 100644 (file)
--- a/git.c
+++ b/git.c
@@ -4,6 +4,7 @@
 #include "exec-cmd.h"
 #include "gettext.h"
 #include "help.h"
+#include "pager.h"
 #include "run-command.h"
 #include "alias.h"
 #include "replace-object.h"
diff --git a/pager.c b/pager.c
index 6367e8ef86796de379e1955672c785fca85bda54..be78c7066441e557406699b954c7923990dfb36a 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1,10 +1,13 @@
 #include "cache.h"
 #include "config.h"
 #include "editor.h"
+#include "pager.h"
 #include "run-command.h"
 #include "sigchain.h"
 #include "alias.h"
 
+int pager_use_color = 1;
+
 #ifndef DEFAULT_PAGER
 #define DEFAULT_PAGER "less"
 #endif
diff --git a/pager.h b/pager.h
new file mode 100644 (file)
index 0000000..b774330
--- /dev/null
+++ b/pager.h
@@ -0,0 +1,17 @@
+#ifndef PAGER_H
+#define PAGER_H
+
+struct child_process;
+
+const char *git_pager(int stdout_is_tty);
+void setup_pager(void);
+int pager_in_use(void);
+int term_columns(void);
+void term_clear_line(void);
+int decimal_width(uintmax_t);
+int check_pager_config(const char *cmd);
+void prepare_pager_args(struct child_process *, const char *pager);
+
+extern int pager_use_color;
+
+#endif /* PAGER_H */
index 76fc4f61e40d8ac6c30b054cf6e2558aa403d96f..c4671603b56eeb4daf1e7f3d2eb5b8b4e97632b9 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -7,6 +7,7 @@
 #include "hex.h"
 #include "utf8.h"
 #include "diff.h"
+#include "pager.h"
 #include "revision.h"
 #include "string-list.h"
 #include "mailmap.h"
index c5c8514737a054cda0c1f879e63773164c1b46ea..96a8e36a52fe4e98b0f7dd19c9dcd84ad278880a 100644 (file)
@@ -10,6 +10,7 @@
 
 #define GIT_TEST_PROGRESS_ONLY
 #include "cache.h"
+#include "pager.h"
 #include "progress.h"
 #include "strbuf.h"
 #include "trace.h"
index a2994331a14938ecc45789b5e2ee50a34df20f6c..a1e0cffb9f6cbd15081a6ee154b415db91c22b7b 100644 (file)
@@ -11,6 +11,7 @@
 #include "linear-assignment.h"
 #include "diffcore.h"
 #include "commit.h"
+#include "pager.h"
 #include "pretty.h"
 #include "userdiff.h"
 #include "apply.h"
index be10249fd0a607ca2637afab8a627a33fb72958d..fcca3b81447086518f0f131dd31dd5aee5da2110 100644 (file)
@@ -12,6 +12,7 @@
 #include "object-name.h"
 #include "object-store.h"
 #include "object.h"
+#include "pager.h"
 #include "commit.h"
 #include "sequencer.h"
 #include "tag.h"