| 1178 | } |
| 1179 | |
| 1180 | static 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 | |
| 1211 | static int should_include(struct commit *commit, void *_data) |
| 1212 | { |
no test coverage detected