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

Function pp_handle_indent

pretty.c:2228–2242  ·  view source on GitHub ↗

* pp_handle_indent() prints out the indentation, and * the whole line (without the final newline), after * de-tabifying. */

Source from the content-addressed store, hash-verified

2226 * de-tabifying.
2227 */
2228static void pp_handle_indent(struct pretty_print_context *pp,
2229 struct strbuf *sb, int indent,
2230 const char *line, int linelen)
2231{
2232 struct grep_opt *opt = pp->rev ? &pp->rev->grep_filter : NULL;
2233
2234 strbuf_addchars(sb, ' ', indent);
2235 if (pp->expand_tabs_in_log)
2236 strbuf_add_tabexpand(sb, opt, pp->color, pp->expand_tabs_in_log,
2237 line, linelen);
2238 else
2239 append_line_with_color(sb, opt, line, linelen, pp->color,
2240 GREP_CONTEXT_BODY,
2241 GREP_HEADER_FIELD_MAX);
2242}
2243
2244static int is_mboxrd_from(const char *line, int len)
2245{

Callers 1

pp_remainderFunction · 0.85

Calls 3

strbuf_addcharsFunction · 0.85
strbuf_add_tabexpandFunction · 0.85
append_line_with_colorFunction · 0.85

Tested by

no test coverage detected