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

Function ws_blank_line

ws.c:272–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272int ws_blank_line(const char *line, int len)
273{
274 /*
275 * We _might_ want to treat CR differently from other
276 * whitespace characters when ws_rule has WS_CR_AT_EOL, but
277 * for now we just use this stupid definition.
278 */
279 while (len-- > 0) {
280 if (!isspace(*line))
281 return 0;
282 line++;
283 }
284 return 1;
285}
286
287/* Copy the line onto the end of the strbuf while fixing whitespaces */
288void ws_fix_copy(struct strbuf *dst, const char *src, int len, unsigned ws_rule, int *error_count)

Callers 3

apply_one_fragmentFunction · 0.85
count_trailing_blankFunction · 0.85
new_blank_line_at_eofFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected