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

Function should_include

pack-bitmap.c:1211–1234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211static int should_include(struct commit *commit, void *_data)
1212{
1213 struct include_data *data = _data;
1214 int bitmap_pos;
1215
1216 bitmap_pos = bitmap_position(data->bitmap_git, &commit->object.oid);
1217 if (bitmap_pos < 0)
1218 bitmap_pos = ext_index_add_object(data->bitmap_git,
1219 (struct object *)commit,
1220 NULL);
1221
1222 if (!add_to_include_set(data->bitmap_git, data, commit, bitmap_pos)) {
1223 struct commit_list *parent = commit->parents;
1224
1225 while (parent) {
1226 parent->item->object.flags |= SEEN;
1227 parent = parent->next;
1228 }
1229
1230 return 0;
1231 }
1232
1233 return 1;
1234}
1235
1236static int should_include_obj(struct object *obj, void *_data)
1237{

Callers

nothing calls this directly

Calls 3

bitmap_positionFunction · 0.85
ext_index_add_objectFunction · 0.85
add_to_include_setFunction · 0.85

Tested by

no test coverage detected