MCPcopy Index your code
hub / github.com/git/git / add_object_entry

Function add_object_entry

builtin/pack-objects.c:1869–1894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1867);
1868
1869static 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
1896static int add_object_entry_from_bitmap(const struct object_id *oid,
1897 enum object_type type,

Callers 10

add_pbase_objectFunction · 0.85
add_tag_chainFunction · 0.85
show_object_pack_hintFunction · 0.85
show_commitFunction · 0.85
show_objectFunction · 0.85
add_loose_objectFunction · 0.85
add_objects_by_pathFunction · 0.85

Calls 7

display_progressFunction · 0.85
have_duplicate_entryFunction · 0.85
want_object_in_packFunction · 0.85
warningFunction · 0.85
create_object_entryFunction · 0.85
pack_name_hash_fnFunction · 0.85
no_try_deltaFunction · 0.85

Tested by

no test coverage detected