* display all the error messages stored in a nice way */
| 262 | * display all the error messages stored in a nice way |
| 263 | */ |
| 264 | static void display_error_msgs(struct unpack_trees_options *o) |
| 265 | { |
| 266 | int e; |
| 267 | unsigned error_displayed = 0; |
| 268 | for (e = 0; e < NB_UNPACK_TREES_ERROR_TYPES; e++) { |
| 269 | struct string_list *rejects = &o->internal.unpack_rejects[e]; |
| 270 | |
| 271 | if (rejects->nr > 0) { |
| 272 | int i; |
| 273 | struct strbuf path = STRBUF_INIT; |
| 274 | |
| 275 | error_displayed = 1; |
| 276 | for (i = 0; i < rejects->nr; i++) |
| 277 | strbuf_addf(&path, "\t%s\n", rejects->items[i].string); |
| 278 | error(ERRORMSG(o, e), super_prefixed(path.buf, |
| 279 | o->super_prefix)); |
| 280 | strbuf_release(&path); |
| 281 | } |
| 282 | string_list_clear(rejects, 0); |
| 283 | } |
| 284 | if (error_displayed) |
| 285 | fprintf(stderr, _("Aborting\n")); |
| 286 | } |
| 287 | |
| 288 | /* |
| 289 | * display all the warning messages stored in a nice way |
no test coverage detected