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

Function display_error_msgs

unpack-trees.c:264–286  ·  view source on GitHub ↗

* display all the error messages stored in a nice way */

Source from the content-addressed store, hash-verified

262 * display all the error messages stored in a nice way
263 */
264static 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

Callers 1

unpack_treesFunction · 0.85

Calls 5

strbuf_addfFunction · 0.85
errorFunction · 0.85
super_prefixedFunction · 0.85
strbuf_releaseFunction · 0.85
string_list_clearFunction · 0.85

Tested by

no test coverage detected