* display all the warning messages stored in a nice way */
| 289 | * display all the warning messages stored in a nice way |
| 290 | */ |
| 291 | static 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 | } |
| 315 | static int check_submodule_move_head(const struct cache_entry *ce, |
| 316 | const char *old_id, |
| 317 | const char *new_id, |
no test coverage detected