| 1867 | ); |
| 1868 | |
| 1869 | static int add_object_entry(const struct object_id *oid, enum object_type type, |
| 1870 | const char *name, int exclude) |
| 1871 | { |
| 1872 | struct packed_git *found_pack = NULL; |
| 1873 | off_t found_offset = 0; |
| 1874 | |
| 1875 | display_progress(progress_state, ++nr_seen); |
| 1876 | |
| 1877 | if (have_duplicate_entry(oid, exclude)) |
| 1878 | return 0; |
| 1879 | |
| 1880 | if (!want_object_in_pack(oid, exclude, &found_pack, &found_offset)) { |
| 1881 | /* The pack is missing an object, so it will not have closure */ |
| 1882 | if (write_bitmap_index) { |
| 1883 | if (write_bitmap_index != WRITE_BITMAP_QUIET) |
| 1884 | warning(_(no_closure_warning)); |
| 1885 | write_bitmap_index = 0; |
| 1886 | } |
| 1887 | return 0; |
| 1888 | } |
| 1889 | |
| 1890 | create_object_entry(oid, type, pack_name_hash_fn(name), |
| 1891 | exclude, name && no_try_delta(name), |
| 1892 | found_pack, found_offset); |
| 1893 | return 1; |
| 1894 | } |
| 1895 | |
| 1896 | static int add_object_entry_from_bitmap(const struct object_id *oid, |
| 1897 | enum object_type type, |
no test coverage detected