Subject: [PATCH v2 06/22] base85.h: move declarations for base85.c functions from cache.h

From: "Elijah Newren via GitGitGadget" <[email-masked]>
Date: Sat, 22 Apr 2023 20:17:13 +0000

From: Elijah Newren <[email-masked]>

Signed-off-by: Elijah Newren <[email-masked]>
---
 apply.c  | 1 +
 base85.c | 3 ++-
 base85.h | 7 +++++++
 cache.h  | 4 ----
 diff.c   | 1 +
 5 files changed, 11 insertions(+), 5 deletions(-)
 create mode 100644 base85.h

diff --git a/apply.c b/apply.c
index efe2dcb0e62..a65a354eef5 100644
--- a/apply.c
+++ b/apply.c
@@ -10,6 +10,7 @@
 #include "cache.h"
 #include "abspath.h"
 #include "alloc.h"
+#include "base85.h"
 #include "config.h"
 #include "object-store.h"
 #include "blob.h"
diff --git a/base85.c b/base85.c
index 5ca601ee14f..bbacdca31b3 100644
--- a/base85.c
+++ b/base85.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "base85.h"
 
 #undef DEBUG_85
 
diff --git a/base85.h b/base85.h
new file mode 100644
index 00000000000..c835086e093
--- /dev/null
+++ b/base85.h
@@ -0,0 +1,7 @@
+#ifndef BASE85_H
+#define BASE85_H
+
+int decode_85(char *dst, const char *line, int linelen);
+void encode_85(char *buf, const unsigned char *data, int bytes);
+
+#endif /* BASE85_H */
diff --git a/cache.h b/cache.h
index 2b661764794..b89f4c59802 100644
--- a/cache.h
+++ b/cache.h
@@ -593,10 +593,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);
 
-/* base85 */
-int decode_85(char *dst, const char *line, int linelen);
-void encode_85(char *buf, const unsigned char *data, int bytes);
-
 /* pkt-line.c */
 void packet_trace_identity(const char *prog);
 
diff --git a/diff.c b/diff.c
index fa86d023196..e697f78a645 100644
--- a/diff.c
+++ b/diff.c
@@ -4,6 +4,7 @@
 #include "cache.h"
 #include "abspath.h"
 #include "alloc.h"
+#include "base85.h"
 #include "config.h"
 #include "convert.h"
 #include "environment.h"
-- 
gitgitgadget