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

Function pp_remainder

pretty.c:2254–2296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2252}
2253
2254void pp_remainder(struct pretty_print_context *pp,
2255 const char **msg_p,
2256 struct strbuf *sb,
2257 int indent)
2258{
2259 struct grep_opt *opt = pp->rev ? &pp->rev->grep_filter : NULL;
2260 int first = 1;
2261
2262 for (;;) {
2263 const char *line = *msg_p;
2264 int linelen = get_one_line(line);
2265 *msg_p += linelen;
2266
2267 if (!linelen)
2268 break;
2269
2270 if (is_blank_line(line, &linelen)) {
2271 if (first)
2272 continue;
2273 if (pp->fmt == CMIT_FMT_SHORT)
2274 break;
2275 }
2276 first = 0;
2277
2278 strbuf_grow(sb, linelen + indent + 20);
2279 if (indent)
2280 pp_handle_indent(pp, sb, indent, line, linelen);
2281 else if (pp->expand_tabs_in_log)
2282 strbuf_add_tabexpand(sb, opt, pp->color,
2283 pp->expand_tabs_in_log, line,
2284 linelen);
2285 else {
2286 if (pp->fmt == CMIT_FMT_MBOXRD &&
2287 is_mboxrd_from(line, linelen))
2288 strbuf_addch(sb, '>');
2289
2290 append_line_with_color(sb, opt, line, linelen,
2291 pp->color, GREP_CONTEXT_BODY,
2292 GREP_HEADER_FIELD_MAX);
2293 }
2294 strbuf_addch(sb, '\n');
2295 }
2296}
2297
2298void pretty_print_commit(struct pretty_print_context *pp,
2299 const struct commit *commit,

Callers 2

pretty_print_commitFunction · 0.85
prepare_cover_textFunction · 0.85

Calls 8

get_one_lineFunction · 0.85
strbuf_growFunction · 0.85
pp_handle_indentFunction · 0.85
strbuf_add_tabexpandFunction · 0.85
is_mboxrd_fromFunction · 0.85
strbuf_addchFunction · 0.85
append_line_with_colorFunction · 0.85
is_blank_lineFunction · 0.70

Tested by

no test coverage detected