* add error messages on path * corresponding to the type with the message * indicating if it should be display in porcelain or not */
| 240 | * indicating if it should be display in porcelain or not |
| 241 | */ |
| 242 | static int add_rejected_path(struct unpack_trees_options *o, |
| 243 | enum unpack_trees_error_types e, |
| 244 | const char *path) |
| 245 | { |
| 246 | if (o->quiet) |
| 247 | return -1; |
| 248 | |
| 249 | if (!o->internal.show_all_errors) |
| 250 | return error(ERRORMSG(o, e), super_prefixed(path, |
| 251 | o->super_prefix)); |
| 252 | |
| 253 | /* |
| 254 | * Otherwise, insert in a list for future display by |
| 255 | * display_(error|warning)_msgs() |
| 256 | */ |
| 257 | string_list_append(&o->internal.unpack_rejects[e], path); |
| 258 | return -1; |
| 259 | } |
| 260 | |
| 261 | /* |
| 262 | * display all the error messages stored in a nice way |
no test coverage detected