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

Function kill_indent

json-writer.c:217–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static void kill_indent(struct strbuf *sb,
218 const struct json_writer *jw)
219{
220 int k;
221 int eat_it = 0;
222
223 strbuf_reset(sb);
224 for (k = 0; k < jw->json.len; k++) {
225 char ch = jw->json.buf[k];
226 if (eat_it && ch == ' ')
227 continue;
228 if (ch == '\n') {
229 eat_it = 1;
230 continue;
231 }
232 eat_it = 0;
233 strbuf_addch(sb, ch);
234 }
235}
236
237static void append_sub_jw(struct json_writer *jw,
238 const struct json_writer *value)

Callers 1

append_sub_jwFunction · 0.85

Calls 1

strbuf_addchFunction · 0.85

Tested by

no test coverage detected