MCPcopy Index your code
hub / github.com/git/git / strbuf_reencode

Function strbuf_reencode

strbuf.c:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157int strbuf_reencode(struct strbuf *sb, const char *from, const char *to)
158{
159 char *out;
160 size_t len;
161
162 if (same_encoding(from, to))
163 return 0;
164
165 out = reencode_string_len(sb->buf, sb->len, to, from, &len);
166 if (!out)
167 return -1;
168
169 strbuf_attach(sb, out, len, len + 1);
170 return 0;
171}
172
173void strbuf_tolower(struct strbuf *sb)
174{

Callers 1

show_http_messageFunction · 0.85

Calls 3

same_encodingFunction · 0.85
strbuf_attachFunction · 0.85
reencode_string_lenFunction · 0.70

Tested by

no test coverage detected