| 359 | } |
| 360 | |
| 361 | static struct progress *get_progress(struct unpack_trees_options *o, |
| 362 | struct index_state *index) |
| 363 | { |
| 364 | unsigned cnt = 0, total = 0; |
| 365 | |
| 366 | if (!o->update || !o->verbose_update) |
| 367 | return NULL; |
| 368 | |
| 369 | for (; cnt < index->cache_nr; cnt++) { |
| 370 | const struct cache_entry *ce = index->cache[cnt]; |
| 371 | if (ce->ce_flags & (CE_UPDATE | CE_WT_REMOVE)) |
| 372 | total++; |
| 373 | } |
| 374 | |
| 375 | return start_delayed_progress(the_repository, |
| 376 | _("Updating files"), total); |
| 377 | } |
| 378 | |
| 379 | static void setup_collided_checkout_detection(struct checkout *state, |
| 380 | struct index_state *index) |
no test coverage detected