diff options
author | Usman Akinyemi <usmanakinyemi202@gmail.com> | 2025-02-15 21:20:48 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-18 09:05:12 -0800 |
commit | cdfd081df6fa42e6cd0da1d978d41b836c1f292b (patch) | |
tree | 6bbdc388d287c54f6669dacc85a4a8abf160aed5 /commit-graph.c | |
parent | 0c124cba5435c59591da7c91e16bbd901a518bd4 (diff) |
version: refactor redact_non_printables()
The git_user_agent_sanitized() function performs some sanitizing to
avoid special characters being sent over the line and possibly messing
up with the protocol or with the parsing on the other side.
Let's extract this sanitizing into a new redact_non_printables() function,
as we will want to reuse it in a following patch.
For now the new redact_non_printables() function is still static as
it's only needed locally.
While at it, let's use strbuf_detach() to explicitly detach the string
contained by the 'buf' strbuf.
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions