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

Function strbuf_add_indented_text

utf8.c:255–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255static void strbuf_add_indented_text(struct strbuf *buf, const char *text,
256 int indent, int indent2)
257{
258 if (indent < 0)
259 indent = 0;
260 while (*text) {
261 const char *eol = strchrnul(text, '\n');
262 if (*eol == '\n')
263 eol++;
264 strbuf_addchars(buf, ' ', indent);
265 strbuf_add(buf, text, eol - text);
266 text = eol;
267 indent = indent2;
268 }
269}
270
271/*
272 * Wrap the text, if necessary. The variable indent is the indent for the

Callers 1

strbuf_add_wrapped_textFunction · 0.85

Calls 2

strbuf_addcharsFunction · 0.85
strbuf_addFunction · 0.85

Tested by

no test coverage detected