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

Function add_to_include_set

pack-bitmap.c:1180–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180static int add_to_include_set(struct bitmap_index *bitmap_git,
1181 struct include_data *data,
1182 struct commit *commit,
1183 int bitmap_pos)
1184{
1185 struct ewah_bitmap *partial;
1186
1187 if (data->seen && bitmap_get(data->seen, bitmap_pos))
1188 return 0;
1189
1190 if (bitmap_get(data->base, bitmap_pos))
1191 return 0;
1192
1193 partial = bitmap_for_commit(bitmap_git, commit);
1194 if (partial) {
1195 existing_bitmaps_hits_nr++;
1196
1197 bitmap_or_ewah(data->base, partial);
1198 return 0;
1199 }
1200
1201 existing_bitmaps_misses_nr++;
1202
1203 bitmap_set(data->base, bitmap_pos);
1204 if (apply_pseudo_merges_for_commit_1(bitmap_git, data->base, commit,
1205 bitmap_pos))
1206 return 0;
1207
1208 return 1;
1209}
1210
1211static int should_include(struct commit *commit, void *_data)
1212{

Callers 1

should_includeFunction · 0.85

Calls 5

bitmap_getFunction · 0.85
bitmap_for_commitFunction · 0.85
bitmap_or_ewahFunction · 0.85
bitmap_setFunction · 0.85

Tested by

no test coverage detected