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

Function wt_longstatus_print_unmerged_data

wt-status.c:341–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341static void wt_longstatus_print_unmerged_data(struct wt_status *s,
342 struct string_list_item *it)
343{
344 const char *c = color(WT_STATUS_UNMERGED, s);
345 struct wt_status_change_data *d = it->util;
346 struct strbuf onebuf = STRBUF_INIT;
347 static char *padding;
348 static int label_width;
349 const char *one, *how;
350 int len;
351
352 if (!padding) {
353 label_width = maxwidth(wt_status_unmerged_status_string, 1, 7);
354 label_width += strlen(" ");
355 padding = xmallocz(label_width);
356 memset(padding, ' ', label_width);
357 }
358
359 one = quote_path(it->string, s->prefix, &onebuf, 0);
360 status_printf(s, color(WT_STATUS_HEADER, s), "\t");
361
362 how = wt_status_unmerged_status_string(d->stagemask);
363 len = label_width - utf8_strwidth(how);
364 status_printf_more(s, c, "%s%.*s%s\n", how, len, padding, one);
365 strbuf_release(&onebuf);
366}
367
368static void wt_longstatus_print_change_data(struct wt_status *s,
369 int change_type,

Callers 1

Calls 9

maxwidthFunction · 0.85
xmalloczFunction · 0.85
quote_pathFunction · 0.85
status_printfFunction · 0.85
utf8_strwidthFunction · 0.85
status_printf_moreFunction · 0.85
strbuf_releaseFunction · 0.85
colorFunction · 0.70

Tested by

no test coverage detected