| 1073 | } |
| 1074 | |
| 1075 | static void wt_longstatus_print_other(struct wt_status *s, |
| 1076 | struct string_list *l, |
| 1077 | const char *what, |
| 1078 | const char *how) |
| 1079 | { |
| 1080 | int i; |
| 1081 | struct strbuf buf = STRBUF_INIT; |
| 1082 | static struct string_list output = STRING_LIST_INIT_DUP; |
| 1083 | struct column_options copts; |
| 1084 | |
| 1085 | if (!l->nr) |
| 1086 | return; |
| 1087 | |
| 1088 | wt_longstatus_print_other_header(s, what, how); |
| 1089 | |
| 1090 | for (i = 0; i < l->nr; i++) { |
| 1091 | struct string_list_item *it; |
| 1092 | const char *path; |
| 1093 | it = &(l->items[i]); |
| 1094 | path = quote_path(it->string, s->prefix, &buf, 0); |
| 1095 | if (column_active(s->colopts)) { |
| 1096 | string_list_append(&output, path); |
| 1097 | continue; |
| 1098 | } |
| 1099 | status_printf(s, color(WT_STATUS_HEADER, s), "\t"); |
| 1100 | status_printf_more(s, color(WT_STATUS_UNTRACKED, s), |
| 1101 | "%s\n", path); |
| 1102 | } |
| 1103 | |
| 1104 | strbuf_release(&buf); |
| 1105 | if (!column_active(s->colopts)) |
| 1106 | goto conclude; |
| 1107 | |
| 1108 | strbuf_addf(&buf, "%s%s\t%s", |
| 1109 | color(WT_STATUS_HEADER, s), |
| 1110 | s->display_comment_prefix ? "#" : "", |
| 1111 | color(WT_STATUS_UNTRACKED, s)); |
| 1112 | memset(&copts, 0, sizeof(copts)); |
| 1113 | copts.padding = 1; |
| 1114 | copts.indent = buf.buf; |
| 1115 | if (want_color(s->use_color)) |
| 1116 | copts.nl = GIT_COLOR_RESET "\n"; |
| 1117 | print_columns(&output, s->colopts, &copts); |
| 1118 | string_list_clear(&output, 0); |
| 1119 | strbuf_release(&buf); |
| 1120 | conclude: |
| 1121 | status_printf_ln(s, GIT_COLOR_NORMAL, "%s", ""); |
| 1122 | } |
| 1123 | |
| 1124 | size_t wt_status_locate_end(const char *s, size_t len) |
| 1125 | { |
no test coverage detected