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

Function increase_indent

json-writer.c:202–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202static void increase_indent(struct strbuf *sb,
203 const struct json_writer *jw,
204 int indent)
205{
206 int k;
207
208 strbuf_reset(sb);
209 for (k = 0; k < jw->json.len; k++) {
210 char ch = jw->json.buf[k];
211 strbuf_addch(sb, ch);
212 if (ch == '\n')
213 strbuf_addchars(sb, ' ', indent);
214 }
215}
216
217static void kill_indent(struct strbuf *sb,
218 const struct json_writer *jw)

Callers 1

append_sub_jwFunction · 0.85

Calls 2

strbuf_addchFunction · 0.85
strbuf_addcharsFunction · 0.85

Tested by

no test coverage detected