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

Function create_object_entry

builtin/pack-objects.c:1838–1863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1836}
1837
1838static struct object_entry *create_object_entry(const struct object_id *oid,
1839 enum object_type type,
1840 uint32_t hash,
1841 int exclude,
1842 int no_try_delta,
1843 struct packed_git *found_pack,
1844 off_t found_offset)
1845{
1846 struct object_entry *entry;
1847
1848 entry = packlist_alloc(&to_pack, oid);
1849 entry->hash = hash;
1850 oe_set_type(entry, type);
1851 if (exclude)
1852 entry->preferred_base = 1;
1853 else
1854 nr_result++;
1855 if (found_pack) {
1856 oe_set_in_pack(&to_pack, entry, found_pack);
1857 entry->in_pack_offset = found_offset;
1858 }
1859
1860 entry->no_try_delta = no_try_delta;
1861
1862 return entry;
1863}
1864
1865static const char no_closure_warning[] = N_(
1866"disabling bitmap writing, as some objects are not being packed"

Callers 4

add_object_entryFunction · 0.85
add_cruft_object_entryFunction · 0.85

Calls 3

packlist_allocFunction · 0.85
oe_set_typeFunction · 0.85
oe_set_in_packFunction · 0.85

Tested by

no test coverage detected