Skip to content

Commit 8bfa6f7

Browse files
committed
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.
1 parent f4b22ef commit 8bfa6f7

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

version.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
const char git_version_string[] = GIT_VERSION;
1313
const char git_built_from_commit_string[] = GIT_BUILT_FROM_COMMIT;
1414

15-
/*
16-
* Trim and replace each character with ascii code below 32 or above
17-
* 127 (included) using a dot '.' character.
18-
*/
19-
static void redact_non_printables(struct strbuf *buf)
15+
void redact_non_printables(struct strbuf *buf)
2016
{
2117
strbuf_trim(buf);
2218
for (size_t i = 0; i < buf->len; i++) {

version.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
extern const char git_version_string[];
55
extern const char git_built_from_commit_string[];
66

7+
struct strbuf;
8+
79
const char *git_user_agent(void);
810
const char *git_user_agent_sanitized(void);
911

12+
/*
13+
* Trim and replace each character with ascii code below 32 or above
14+
* 127 (included) using a dot '.' character.
15+
*/
16+
void redact_non_printables(struct strbuf *buf);
17+
1018
#endif /* VERSION_H */

0 commit comments

Comments
 (0)