| 2603 | } |
| 2604 | |
| 2605 | static void get_object_details(void) |
| 2606 | { |
| 2607 | uint32_t i; |
| 2608 | struct object_entry **sorted_by_offset; |
| 2609 | |
| 2610 | if (progress) |
| 2611 | progress_state = start_progress(the_repository, |
| 2612 | _("Counting objects"), |
| 2613 | to_pack.nr_objects); |
| 2614 | |
| 2615 | CALLOC_ARRAY(sorted_by_offset, to_pack.nr_objects); |
| 2616 | for (i = 0; i < to_pack.nr_objects; i++) |
| 2617 | sorted_by_offset[i] = to_pack.objects + i; |
| 2618 | QSORT(sorted_by_offset, to_pack.nr_objects, pack_offset_sort); |
| 2619 | |
| 2620 | for (i = 0; i < to_pack.nr_objects; i++) { |
| 2621 | struct object_entry *entry = sorted_by_offset[i]; |
| 2622 | check_object(entry, i); |
| 2623 | if (entry->type_valid && |
| 2624 | oe_size_greater_than(&to_pack, entry, |
| 2625 | repo_settings_get_big_file_threshold(the_repository))) |
| 2626 | entry->no_try_delta = 1; |
| 2627 | display_progress(progress_state, i + 1); |
| 2628 | } |
| 2629 | stop_progress(&progress_state); |
| 2630 | |
| 2631 | /* |
| 2632 | * This must happen in a second pass, since we rely on the delta |
| 2633 | * information for the whole list being completed. |
| 2634 | */ |
| 2635 | for (i = 0; i < to_pack.nr_objects; i++) |
| 2636 | break_delta_chains(&to_pack.objects[i]); |
| 2637 | |
| 2638 | free(sorted_by_offset); |
| 2639 | } |
| 2640 | |
| 2641 | /* |
| 2642 | * We search for deltas in a list sorted by type, by filename hash, and then |
no test coverage detected