MCPcopy Create free account
hub / github.com/git/git / cleanup_space

Function cleanup_space

mailinfo.c:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "mailinfo.h"
11
12static void cleanup_space(struct strbuf *sb)
13{
14 size_t pos, cnt;
15 for (pos = 0; pos < sb->len; pos++) {
16 if (isspace(sb->buf[pos])) {
17 sb->buf[pos] = ' ';
18 for (cnt = 0; isspace(sb->buf[pos + cnt + 1]); cnt++);
19 strbuf_remove(sb, pos + 1, cnt);
20 }
21 }
22}
23
24static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)
25{

Callers 2

handle_fromFunction · 0.70
handle_infoFunction · 0.70

Calls 1

strbuf_removeFunction · 0.85

Tested by

no test coverage detected