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

Function prepare_packing_data

pack-objects.c:135–153  ·  view source on GitHub ↗

assume pdata is already zero'd by caller */

Source from the content-addressed store, hash-verified

133
134/* assume pdata is already zero'd by caller */
135void prepare_packing_data(struct repository *r, struct packing_data *pdata)
136{
137 pdata->repo = r;
138
139 if (git_env_bool("GIT_TEST_FULL_IN_PACK_ARRAY", 0)) {
140 /*
141 * do not initialize in_pack_by_idx[] to force the
142 * slow path in oe_in_pack()
143 */
144 } else {
145 prepare_in_pack_by_idx(pdata);
146 }
147
148 pdata->oe_size_limit = git_env_ulong("GIT_TEST_OE_SIZE",
149 1U << OE_SIZE_BITS);
150 pdata->oe_delta_size_limit = git_env_ulong("GIT_TEST_OE_DELTA_SIZE",
151 1UL << OE_DELTA_SIZE_BITS);
152 init_recursive_mutex(&pdata->odb_lock);
153}
154
155void clear_packing_data(struct packing_data *pdata)
156{

Callers 3

bitmap_writeFunction · 0.85
cmd_pack_objectsFunction · 0.85

Calls 4

git_env_boolFunction · 0.85
prepare_in_pack_by_idxFunction · 0.85
git_env_ulongFunction · 0.85
init_recursive_mutexFunction · 0.85

Tested by 1

bitmap_writeFunction · 0.68