[PATCH v4 3/6] version: make redact_non_printables() non-static
As we are going to reuse redact_non_printables() outside "version.c",
let's make it non-static.
---
version.c | 6 +-----
version.h | 8 ++++++++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/version.c b/version.c
index 4f37b4499d..77423fcaf3 100644
--- a/version.c
+++ b/version.c
@@ -12,11 +12,7 @@
const char git_version_string[] = GIT_VERSION;
const char git_built_from_commit_string[] = GIT_BUILT_FROM_COMMIT;
-/*
- * Trim and replace each character with ascii code below 32 or above
- * 127 (included) using a dot '.' character.
- */
-static void redact_non_printables(struct strbuf *buf)
+void redact_non_printables(struct strbuf *buf)
{
strbuf_trim(buf);
for (size_t i = 0; i < buf->len; i++) {
diff --git a/version.h b/version.h
index 7c62e80577..fcc1816685 100644
--- a/version.h
+++ b/version.h
@@ -4,7 +4,15 @@
extern const char git_version_string[];
extern const char git_built_from_commit_string[];
+struct strbuf;
+
const char *git_user_agent(void);
const char *git_user_agent_sanitized(void);
+/*
+ * Trim and replace each character with ascii code below 32 or above
+ * 127 (included) using a dot '.' character.
+*/
+void redact_non_printables(struct strbuf *buf);
+
#endif /* VERSION_H */
--
2.46.0.rc0.95.gcbf174a634