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

Function display_warning_msgs

unpack-trees.c:291–314  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

289 * display all the warning messages stored in a nice way
290 */
291static void display_warning_msgs(struct unpack_trees_options *o)
292{
293 int e;
294 unsigned warning_displayed = 0;
295 for (e = NB_UNPACK_TREES_ERROR_TYPES + 1;
296 e < NB_UNPACK_TREES_WARNING_TYPES; e++) {
297 struct string_list *rejects = &o->internal.unpack_rejects[e];
298
299 if (rejects->nr > 0) {
300 int i;
301 struct strbuf path = STRBUF_INIT;
302
303 warning_displayed = 1;
304 for (i = 0; i < rejects->nr; i++)
305 strbuf_addf(&path, "\t%s\n", rejects->items[i].string);
306 warning(ERRORMSG(o, e), super_prefixed(path.buf,
307 o->super_prefix));
308 strbuf_release(&path);
309 }
310 string_list_clear(rejects, 0);
311 }
312 if (warning_displayed)
313 fprintf(stderr, _("After fixing the above paths, you may want to run `git sparse-checkout reapply`.\n"));
314}
315static int check_submodule_move_head(const struct cache_entry *ce,
316 const char *old_id,
317 const char *new_id,

Callers 2

unpack_treesFunction · 0.85
update_sparsityFunction · 0.85

Calls 5

strbuf_addfFunction · 0.85
warningFunction · 0.85
super_prefixedFunction · 0.85
strbuf_releaseFunction · 0.85
string_list_clearFunction · 0.85

Tested by

no test coverage detected